{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import scipy.io as sio"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 双行生成单行数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/PASCALContexts/2009_004368.png\r\n",
      "\n",
      "/PASCALContexts/2010_002638.png\r\n",
      "\n",
      "/PASCALContexts/2009_001542.png\r\n",
      "\n",
      "/PASCALContexts/2009_002419.png\r\n",
      "\n",
      "/PASCALContexts/2010_003534.png\r\n",
      "\n",
      "/PASCALContexts/2008_002811.png\r\n",
      "\n",
      "/PASCALContexts/2010_000495.png\r\n",
      "\n",
      "/PASCALContexts/2010_002499.png\r\n",
      "\n",
      "/PASCALContexts/2009_000453.png\r\n",
      "\n",
      "/PASCALContexts/2008_007189.png\r\n",
      "\n",
      "/PASCALContexts/2008_000233.png\r\n",
      "\n",
      "/PASCALContexts/2010_005238.png\r\n",
      "\n",
      "/PASCALContexts/2008_006462.png\r\n",
      "\n",
      "/PASCALContexts/2010_004143.png\r\n",
      "\n",
      "/PASCALContexts/2009_000136.png\r\n",
      "\n",
      "/PASCALContexts/2009_003822.png\r\n",
      "\n",
      "/PASCALContexts/2009_003666.png\r\n",
      "\n",
      "/PASCALContexts/2010_002794.png\r\n",
      "\n",
      "/PASCALContexts/2010_003931.png\r\n",
      "\n",
      "/PASCALContexts/2009_002833.png\r\n",
      "\n",
      "/PASCALContexts/2008_005433.png\r\n",
      "\n",
      "/PASCALContexts/2010_004691.png\r\n",
      "\n",
      "/PASCALContexts/2010_000647.png\r\n",
      "\n",
      "/PASCALContexts/2010_002337.png\r\n",
      "\n",
      "/PASCALContexts/2008_001523.png\r\n",
      "\n",
      "/PASCALContexts/2010_001204.png\r\n",
      "\n",
      "/PASCALContexts/2008_008095.png\r\n",
      "\n",
      "/PASCALContexts/2010_001669.png\r\n",
      "\n",
      "/PASCALContexts/2008_002873.png\r\n",
      "\n",
      "/PASCALContexts/2008_002145.png\r\n",
      "\n",
      "/PASCALContexts/2008_004457.png\r\n",
      "\n",
      "/PASCALContexts/2008_003547.png\r\n",
      "\n",
      "/PASCALContexts/2010_003092.png\r\n",
      "\n",
      "/PASCALContexts/2008_007692.png\r\n",
      "\n",
      "/PASCALContexts/2008_001741.png\r\n",
      "\n",
      "/PASCALContexts/2008_004583.png\r\n",
      "\n",
      "/PASCALContexts/2009_001783.png\r\n",
      "\n",
      "/PASCALContexts/2009_003816.png\r\n",
      "\n",
      "/PASCALContexts/2008_003624.png\r\n",
      "\n",
      "/PASCALContexts/2010_002692.png\r\n",
      "\n",
      "/PASCALContexts/2008_008666.png\r\n",
      "\n",
      "/PASCALContexts/2009_000628.png\r\n",
      "\n",
      "/PASCALContexts/2009_003950.png\r\n",
      "\n",
      "/PASCALContexts/2008_006369.png\r\n",
      "\n",
      "/PASCALContexts/2008_000174.png\r\n",
      "\n",
      "/PASCALContexts/2010_002614.png\r\n",
      "\n",
      "/PASCALContexts/2008_005245.png\r\n",
      "\n",
      "/PASCALContexts/2008_007579.png\r\n",
      "\n",
      "/PASCALContexts/2008_000908.png\r\n",
      "\n",
      "/PASCALContexts/2010_005640.png\r\n",
      "\n",
      "/PASCALContexts/2010_001710.png\r\n",
      "\n",
      "/PASCALContexts/2008_000195.png\r\n",
      "\n",
      "/PASCALContexts/2010_005805.png\r\n",
      "\n",
      "/PASCALContexts/2009_005149.png\r\n",
      "\n",
      "/PASCALContexts/2008_000806.png\r\n",
      "\n",
      "/PASCALContexts/2010_004306.png\r\n",
      "\n",
      "/PASCALContexts/2009_003753.png\r\n",
      "\n",
      "/PASCALContexts/2008_000471.png\r\n",
      "\n",
      "/PASCALContexts/2008_004621.png\r\n",
      "\n",
      "/PASCALContexts/2009_003863.png\r\n",
      "\n",
      "/PASCALContexts/2010_005152.png\r\n",
      "\n",
      "/PASCALContexts/2008_004452.png\r\n",
      "\n",
      "/PASCALContexts/2008_005874.png\r\n",
      "\n",
      "/PASCALContexts/2009_004093.png\r\n",
      "\n",
      "/PASCALContexts/2010_005543.png\r\n",
      "\n",
      "/PASCALContexts/2010_004857.png\r\n",
      "\n",
      "/PASCALContexts/2009_000377.png\r\n",
      "\n",
      "/PASCALContexts/2010_004959.png\r\n",
      "\n",
      "/PASCALContexts/2008_005101.png\r\n",
      "\n",
      "/PASCALContexts/2009_004601.png\r\n",
      "\n",
      "/PASCALContexts/2009_002960.png\r\n",
      "\n",
      "/PASCALContexts/2010_001333.png\r\n",
      "\n",
      "/PASCALContexts/2008_004754.png\r\n",
      "\n",
      "/PASCALContexts/2009_004193.png\r\n",
      "\n",
      "/PASCALContexts/2008_000700.png\r\n",
      "\n",
      "/PASCALContexts/2009_001910.png\r\n",
      "\n",
      "/PASCALContexts/2009_000931.png\r\n",
      "\n",
      "/PASCALContexts/2008_008676.png\r\n",
      "\n",
      "/PASCALContexts/2008_005065.png\r\n",
      "\n",
      "/PASCALContexts/2008_008668.png\r\n",
      "\n",
      "/PASCALContexts/2008_005764.png\r\n",
      "\n",
      "/PASCALContexts/2009_005036.png\r\n",
      "\n",
      "/PASCALContexts/2008_005574.png\r\n",
      "\n",
      "/PASCALContexts/2009_003222.png\r\n",
      "\n",
      "/PASCALContexts/2008_000711.png\r\n",
      "\n",
      "/PASCALContexts/2010_003828.png\r\n",
      "\n",
      "/PASCALContexts/2010_005386.png\r\n",
      "\n",
      "/PASCALContexts/2010_001448.png\r\n",
      "\n",
      "/PASCALContexts/2008_001395.png\r\n",
      "\n",
      "/PASCALContexts/2009_004417.png\r\n",
      "\n",
      "/PASCALContexts/2010_004105.png\r\n",
      "\n",
      "/PASCALContexts/2008_004410.png\r\n",
      "\n",
      "/PASCALContexts/2009_001980.png\r\n",
      "\n",
      "/PASCALContexts/2009_001623.png\r\n",
      "\n",
      "/PASCALContexts/2010_005432.png\r\n",
      "\n",
      "/PASCALContexts/2009_005294.png\r\n",
      "\n",
      "/PASCALContexts/2010_002333.png\r\n",
      "\n",
      "/PASCALContexts/2009_003265.png\r\n",
      "\n",
      "/PASCALContexts/2008_006793.png\r\n",
      "\n",
      "/PASCALContexts/2009_003455.png\r\n",
      "\n",
      "/PASCALContexts/2008_006746.png\r\n",
      "\n",
      "/PASCALContexts/2008_006438.png\r\n",
      "\n",
      "/PASCALContexts/2008_004138.png\r\n",
      "\n",
      "/PASCALContexts/2008_001278.png\r\n",
      "\n",
      "/PASCALContexts/2009_004016.png\r\n",
      "\n",
      "/PASCALContexts/2010_003078.png\r\n",
      "\n",
      "/PASCALContexts/2009_001740.png\r\n",
      "\n",
      "/PASCALContexts/2009_004836.png\r\n",
      "\n",
      "/PASCALContexts/2008_002590.png\r\n",
      "\n",
      "/PASCALContexts/2009_000471.png\r\n",
      "\n",
      "/PASCALContexts/2009_000562.png\r\n",
      "\n",
      "/PASCALContexts/2008_002329.png\r\n",
      "\n",
      "/PASCALContexts/2008_007635.png\r\n",
      "\n",
      "/PASCALContexts/2008_001235.png\r\n",
      "\n",
      "/PASCALContexts/2010_001893.png\r\n",
      "\n",
      "/PASCALContexts/2008_000026.png\r\n",
      "\n",
      "/PASCALContexts/2008_002804.png\r\n",
      "\n",
      "/PASCALContexts/2008_007197.png\r\n",
      "\n",
      "/PASCALContexts/2010_003800.png\r\n",
      "\n",
      "/PASCALContexts/2010_005457.png\r\n",
      "\n",
      "/PASCALContexts/2009_001268.png\r\n",
      "\n",
      "/PASCALContexts/2010_004141.png\r\n",
      "\n",
      "/PASCALContexts/2010_005332.png\r\n",
      "\n",
      "/PASCALContexts/2009_000192.png\r\n",
      "\n",
      "/PASCALContexts/2010_001399.png\r\n",
      "\n",
      "/PASCALContexts/2010_003609.png\r\n",
      "\n",
      "/PASCALContexts/2010_002526.png\r\n",
      "\n",
      "/PASCALContexts/2010_000033.png\r\n",
      "\n",
      "/PASCALContexts/2010_004656.png\r\n",
      "\n",
      "/PASCALContexts/2008_002725.png\r\n",
      "\n",
      "/PASCALContexts/2008_003814.png\r\n",
      "\n",
      "/PASCALContexts/2008_005603.png\r\n",
      "\n",
      "/PASCALContexts/2008_002985.png\r\n",
      "\n",
      "/PASCALContexts/2008_005109.png\r\n",
      "\n",
      "/PASCALContexts/2010_001253.png\r\n",
      "\n",
      "/PASCALContexts/2009_001593.png\r\n",
      "\n",
      "/PASCALContexts/2008_004006.png\r\n",
      "\n",
      "/PASCALContexts/2008_001704.png\r\n",
      "\n",
      "/PASCALContexts/2008_004243.png\r\n",
      "\n",
      "/PASCALContexts/2008_006920.png\r\n",
      "\n",
      "/PASCALContexts/2010_005346.png\r\n",
      "\n",
      "/PASCALContexts/2009_005128.png\r\n",
      "\n",
      "/PASCALContexts/2009_000216.png\r\n",
      "\n",
      "/PASCALContexts/2008_007291.png\r\n",
      "\n",
      "/PASCALContexts/2008_005699.png\r\n",
      "\n",
      "/PASCALContexts/2010_000743.png\r\n",
      "\n",
      "/PASCALContexts/2010_000139.png\r\n",
      "\n",
      "/PASCALContexts/2008_008746.png\r\n",
      "\n",
      "/PASCALContexts/2008_003041.png\r\n",
      "\n",
      "/PASCALContexts/2010_003987.png\r\n",
      "\n",
      "/PASCALContexts/2008_005679.png\r\n",
      "\n",
      "/PASCALContexts/2009_000723.png\r\n",
      "\n",
      "/PASCALContexts/2008_004427.png\r\n",
      "\n",
      "/PASCALContexts/2010_001715.png\r\n",
      "\n",
      "/PASCALContexts/2008_000373.png\r\n",
      "\n",
      "/PASCALContexts/2009_002837.png\r\n",
      "\n",
      "/PASCALContexts/2008_004110.png\r\n",
      "\n",
      "/PASCALContexts/2010_005429.png\r\n",
      "\n",
      "/PASCALContexts/2009_000759.png\r\n",
      "\n",
      "/PASCALContexts/2009_002632.png\r\n",
      "\n",
      "/PASCALContexts/2010_005676.png\r\n",
      "\n",
      "/PASCALContexts/2008_005748.png\r\n",
      "\n",
      "/PASCALContexts/2008_006631.png\r\n",
      "\n",
      "/PASCALContexts/2010_004219.png\r\n",
      "\n",
      "/PASCALContexts/2009_003537.png\r\n",
      "\n",
      "/PASCALContexts/2010_005606.png\r\n",
      "\n",
      "/PASCALContexts/2010_002392.png\r\n",
      "\n",
      "/PASCALContexts/2008_003521.png\r\n",
      "\n",
      "/PASCALContexts/2008_004071.png\r\n",
      "\n",
      "/PASCALContexts/2008_004406.png\r\n",
      "\n",
      "/PASCALContexts/2009_004202.png\r\n",
      "\n",
      "/PASCALContexts/2009_001747.png\r\n",
      "\n",
      "/PASCALContexts/2008_006708.png\r\n",
      "\n",
      "/PASCALContexts/2008_008012.png\r\n",
      "\n",
      "/PASCALContexts/2008_006064.png\r\n",
      "\n",
      "/PASCALContexts/2008_004766.png\r\n",
      "\n",
      "/PASCALContexts/2010_004558.png\r\n",
      "\n",
      "/PASCALContexts/2010_002085.png\r\n",
      "\n",
      "/PASCALContexts/2009_004556.png\r\n",
      "\n",
      "/PASCALContexts/2009_000293.png\r\n",
      "\n",
      "/PASCALContexts/2009_003071.png\r\n",
      "\n",
      "/PASCALContexts/2009_004631.png\r\n",
      "\n",
      "/PASCALContexts/2008_004258.png\r\n",
      "\n",
      "/PASCALContexts/2008_008070.png\r\n",
      "\n",
      "/PASCALContexts/2008_002467.png\r\n",
      "\n",
      "/PASCALContexts/2009_000815.png\r\n",
      "\n",
      "/PASCALContexts/2009_004148.png\r\n",
      "\n",
      "/PASCALContexts/2010_004204.png\r\n",
      "\n",
      "/PASCALContexts/2008_007286.png\r\n",
      "\n",
      "/PASCALContexts/2009_002372.png\r\n",
      "\n",
      "/PASCALContexts/2009_002192.png\r\n",
      "\n",
      "/PASCALContexts/2010_001002.png\r\n",
      "\n",
      "/PASCALContexts/2008_008080.png\r\n",
      "\n",
      "/PASCALContexts/2010_002369.png\r\n",
      "\n",
      "/PASCALContexts/2008_004416.png\r\n",
      "\n",
      "/PASCALContexts/2009_004468.png\r\n",
      "\n",
      "/PASCALContexts/2008_005361.png\r\n",
      "\n",
      "/PASCALContexts/2008_006052.png\r\n",
      "\n",
      "/PASCALContexts/2010_005071.png\r\n",
      "\n",
      "/PASCALContexts/2008_002672.png\r\n",
      "\n",
      "/PASCALContexts/2008_008393.png\r\n",
      "\n",
      "/PASCALContexts/2008_004518.png\r\n",
      "\n",
      "/PASCALContexts/2008_007739.png\r\n",
      "\n",
      "/PASCALContexts/2009_003827.png\r\n",
      "\n",
      "/PASCALContexts/2008_007640.png\r\n",
      "\n",
      "/PASCALContexts/2008_002428.png\r\n",
      "\n",
      "/PASCALContexts/2008_006912.png\r\n",
      "\n",
      "/PASCALContexts/2008_004015.png\r\n",
      "\n",
      "/PASCALContexts/2009_002242.png\r\n",
      "\n",
      "/PASCALContexts/2010_004506.png\r\n",
      "\n",
      "/PASCALContexts/2009_005025.png\r\n",
      "\n",
      "/PASCALContexts/2009_000708.png\r\n",
      "\n",
      "/PASCALContexts/2008_008021.png\r\n",
      "\n",
      "/PASCALContexts/2009_002681.png\r\n",
      "\n",
      "/PASCALContexts/2008_008423.png\r\n",
      "\n",
      "/PASCALContexts/2010_002954.png\r\n",
      "\n",
      "/PASCALContexts/2010_003197.png\r\n",
      "\n",
      "/PASCALContexts/2008_002801.png\r\n",
      "\n",
      "/PASCALContexts/2009_003199.png\r\n",
      "\n",
      "/PASCALContexts/2008_006949.png\r\n",
      "\n",
      "/PASCALContexts/2008_003323.png\r\n",
      "\n",
      "/PASCALContexts/2010_005406.png\r\n",
      "\n",
      "/PASCALContexts/2009_001884.png\r\n",
      "\n",
      "/PASCALContexts/2010_000234.png\r\n",
      "\n",
      "/PASCALContexts/2008_000981.png\r\n",
      "\n",
      "/PASCALContexts/2008_004984.png\r\n",
      "\n",
      "/PASCALContexts/2010_003547.png\r\n",
      "\n",
      "/PASCALContexts/2008_003763.png\r\n",
      "\n",
      "/PASCALContexts/2008_006424.png\r\n",
      "\n",
      "/PASCALContexts/2008_005758.png\r\n",
      "\n",
      "/PASCALContexts/2009_002629.png\r\n",
      "\n",
      "/PASCALContexts/2008_001825.png\r\n",
      "\n",
      "/PASCALContexts/2009_002648.png\r\n",
      "\n",
      "/PASCALContexts/2010_001687.png\r\n",
      "\n",
      "/PASCALContexts/2009_000419.png\r\n",
      "\n",
      "/PASCALContexts/2010_003725.png\r\n",
      "\n",
      "/PASCALContexts/2008_000251.png\r\n",
      "\n",
      "/PASCALContexts/2010_005877.png\r\n",
      "\n",
      "/PASCALContexts/2010_001808.png\r\n",
      "\n",
      "/PASCALContexts/2008_006509.png\r\n",
      "\n",
      "/PASCALContexts/2008_005257.png\r\n",
      "\n",
      "/PASCALContexts/2009_003793.png\r\n",
      "\n",
      "/PASCALContexts/2010_002113.png\r\n",
      "\n",
      "/PASCALContexts/2008_000982.png\r\n",
      "\n",
      "/PASCALContexts/2010_004179.png\r\n",
      "\n",
      "/PASCALContexts/2008_006953.png\r\n",
      "\n",
      "/PASCALContexts/2008_007864.png\r\n",
      "\n",
      "/PASCALContexts/2008_002972.png\r\n",
      "\n",
      "/PASCALContexts/2008_001160.png\r\n",
      "\n",
      "/PASCALContexts/2009_001570.png\r\n",
      "\n",
      "/PASCALContexts/2008_007610.png\r\n",
      "\n",
      "/PASCALContexts/2008_001142.png\r\n",
      "\n",
      "/PASCALContexts/2010_003854.png\r\n",
      "\n",
      "/PASCALContexts/2008_006441.png\r\n",
      "\n",
      "/PASCALContexts/2009_000171.png\r\n",
      "\n",
      "/PASCALContexts/2008_004378.png\r\n",
      "\n",
      "/PASCALContexts/2009_005152.png\r\n",
      "\n",
      "/PASCALContexts/2010_002274.png\r\n",
      "\n",
      "/PASCALContexts/2008_006700.png\r\n",
      "\n",
      "/PASCALContexts/2010_002830.png\r\n",
      "\n",
      "/PASCALContexts/2008_001666.png\r\n",
      "\n",
      "/PASCALContexts/2008_005979.png\r\n",
      "\n",
      "/PASCALContexts/2010_006023.png\r\n",
      "\n",
      "/PASCALContexts/2008_003067.png\r\n",
      "\n",
      "/PASCALContexts/2010_000590.png\r\n",
      "\n",
      "/PASCALContexts/2009_000500.png\r\n",
      "\n",
      "/PASCALContexts/2009_003961.png\r\n",
      "\n",
      "/PASCALContexts/2010_000401.png\r\n",
      "\n",
      "/PASCALContexts/2010_000711.png\r\n",
      "\n",
      "/PASCALContexts/2008_002280.png\r\n",
      "\n",
      "/PASCALContexts/2010_001868.png\r\n",
      "\n",
      "/PASCALContexts/2008_005035.png\r\n",
      "\n",
      "/PASCALContexts/2009_000742.png\r\n",
      "\n",
      "/PASCALContexts/2008_005431.png\r\n",
      "\n",
      "/PASCALContexts/2010_001732.png\r\n",
      "\n",
      "/PASCALContexts/2009_002695.png\r\n",
      "\n",
      "/PASCALContexts/2010_004878.png\r\n",
      "\n",
      "/PASCALContexts/2009_002221.png\r\n",
      "\n",
      "/PASCALContexts/2008_008382.png\r\n",
      "\n",
      "/PASCALContexts/2008_006285.png\r\n",
      "\n",
      "/PASCALContexts/2009_001133.png\r\n",
      "\n",
      "/PASCALContexts/2010_005906.png\r\n",
      "\n",
      "/PASCALContexts/2010_003252.png\r\n",
      "\n",
      "/PASCALContexts/2010_002497.png\r\n",
      "\n",
      "/PASCALContexts/2009_001509.png\r\n",
      "\n",
      "/PASCALContexts/2008_003107.png\r\n",
      "\n",
      "/PASCALContexts/2008_003753.png\r\n",
      "\n",
      "/PASCALContexts/2008_003589.png\r\n",
      "\n",
      "/PASCALContexts/2008_005566.png\r\n",
      "\n",
      "/PASCALContexts/2008_005451.png\r\n",
      "\n",
      "/PASCALContexts/2008_002852.png\r\n",
      "\n",
      "/PASCALContexts/2009_001780.png\r\n",
      "\n",
      "/PASCALContexts/2010_000578.png\r\n",
      "\n",
      "/PASCALContexts/2008_008600.png\r\n",
      "\n",
      "/PASCALContexts/2009_004133.png\r\n",
      "\n",
      "/PASCALContexts/2008_004907.png\r\n",
      "\n",
      "/PASCALContexts/2008_000910.png\r\n",
      "\n",
      "/PASCALContexts/2008_007690.png\r\n",
      "\n",
      "/PASCALContexts/2010_004149.png\r\n",
      "\n",
      "/PASCALContexts/2008_000123.png\r\n",
      "\n",
      "/PASCALContexts/2009_000385.png\r\n",
      "\n",
      "/PASCALContexts/2010_004198.png\r\n",
      "\n",
      "/PASCALContexts/2009_003259.png\r\n",
      "\n",
      "/PASCALContexts/2008_003579.png\r\n",
      "\n",
      "/PASCALContexts/2009_002348.png\r\n",
      "\n",
      "/PASCALContexts/2008_007239.png\r\n",
      "\n",
      "/PASCALContexts/2010_005026.png\r\n",
      "\n",
      "/PASCALContexts/2010_006057.png\r\n",
      "\n",
      "/PASCALContexts/2009_004440.png\r\n",
      "\n",
      "/PASCALContexts/2010_001739.png\r\n",
      "\n",
      "/PASCALContexts/2009_000145.png\r\n",
      "\n",
      "/PASCALContexts/2008_007750.png\r\n",
      "\n",
      "/PASCALContexts/2008_004665.png\r\n",
      "\n",
      "/PASCALContexts/2009_003490.png\r\n",
      "\n",
      "/PASCALContexts/2009_001369.png\r\n",
      "\n",
      "/PASCALContexts/2010_001189.png\r\n",
      "\n",
      "/PASCALContexts/2008_001781.png\r\n",
      "\n",
      "/PASCALContexts/2008_007293.png\r\n",
      "\n",
      "/PASCALContexts/2010_000498.png\r\n",
      "\n",
      "/PASCALContexts/2010_003728.png\r\n",
      "\n",
      "/PASCALContexts/2009_001758.png\r\n",
      "\n",
      "/PASCALContexts/2009_004361.png\r\n",
      "\n",
      "/PASCALContexts/2010_000110.png\r\n",
      "\n",
      "/PASCALContexts/2009_001249.png\r\n",
      "\n",
      "/PASCALContexts/2008_006968.png\r\n",
      "\n",
      "/PASCALContexts/2010_002684.png\r\n",
      "\n",
      "/PASCALContexts/2009_000629.png\r\n",
      "\n",
      "/PASCALContexts/2008_005376.png\r\n",
      "\n",
      "/PASCALContexts/2010_006062.png\r\n",
      "\n",
      "/PASCALContexts/2008_007515.png\r\n",
      "\n",
      "/PASCALContexts/2008_002856.png\r\n",
      "\n",
      "/PASCALContexts/2009_003656.png\r\n",
      "\n",
      "/PASCALContexts/2009_002445.png\r\n",
      "\n",
      "/PASCALContexts/2008_001866.png\r\n",
      "\n",
      "/PASCALContexts/2009_002749.png\r\n",
      "\n",
      "/PASCALContexts/2008_008319.png\r\n",
      "\n",
      "/PASCALContexts/2008_000187.png\r\n",
      "\n",
      "/PASCALContexts/2009_002145.png\r\n",
      "\n",
      "/PASCALContexts/2008_006797.png\r\n",
      "\n",
      "/PASCALContexts/2008_002052.png\r\n",
      "\n",
      "/PASCALContexts/2009_001810.png\r\n",
      "\n",
      "/PASCALContexts/2010_005596.png\r\n",
      "\n",
      "/PASCALContexts/2008_002495.png\r\n",
      "\n",
      "/PASCALContexts/2008_000376.png\r\n",
      "\n",
      "/PASCALContexts/2010_004451.png\r\n",
      "\n",
      "/PASCALContexts/2009_001006.png\r\n",
      "\n",
      "/PASCALContexts/2009_003271.png\r\n",
      "\n",
      "/PASCALContexts/2008_008342.png\r\n",
      "\n",
      "/PASCALContexts/2009_002570.png\r\n",
      "\n",
      "/PASCALContexts/2009_003316.png\r\n",
      "\n",
      "/PASCALContexts/2010_001850.png\r\n",
      "\n",
      "/PASCALContexts/2009_002524.png\r\n",
      "\n",
      "/PASCALContexts/2009_002097.png\r\n",
      "\n",
      "/PASCALContexts/2008_008296.png\r\n",
      "\n",
      "/PASCALContexts/2010_000133.png\r\n",
      "\n",
      "/PASCALContexts/2008_008122.png\r\n",
      "\n",
      "/PASCALContexts/2009_001374.png\r\n",
      "\n",
      "/PASCALContexts/2008_003076.png\r\n",
      "\n",
      "/PASCALContexts/2009_004784.png\r\n",
      "\n",
      "/PASCALContexts/2008_007163.png\r\n",
      "\n",
      "/PASCALContexts/2009_004518.png\r\n",
      "\n",
      "/PASCALContexts/2008_001586.png\r\n",
      "\n",
      "/PASCALContexts/2009_001937.png\r\n",
      "\n",
      "/PASCALContexts/2009_003052.png\r\n",
      "\n",
      "/PASCALContexts/2009_004031.png\r\n",
      "\n",
      "/PASCALContexts/2009_002912.png\r\n",
      "\n",
      "/PASCALContexts/2009_002558.png\r\n",
      "\n",
      "/PASCALContexts/2008_006705.png\r\n",
      "\n",
      "/PASCALContexts/2008_002954.png\r\n",
      "\n",
      "/PASCALContexts/2009_005056.png\r\n",
      "\n",
      "/PASCALContexts/2008_004462.png\r\n",
      "\n",
      "/PASCALContexts/2008_000723.png\r\n",
      "\n",
      "/PASCALContexts/2010_000524.png\r\n",
      "\n",
      "/PASCALContexts/2008_005247.png\r\n",
      "\n",
      "/PASCALContexts/2010_000942.png\r\n",
      "\n",
      "/PASCALContexts/2009_002698.png\r\n",
      "\n",
      "/PASCALContexts/2009_002299.png\r\n",
      "\n",
      "/PASCALContexts/2009_003269.png\r\n",
      "\n",
      "/PASCALContexts/2010_001425.png\r\n",
      "\n",
      "/PASCALContexts/2008_001481.png\r\n",
      "\n",
      "/PASCALContexts/2008_004656.png\r\n",
      "\n",
      "/PASCALContexts/2010_002742.png\r\n",
      "\n",
      "/PASCALContexts/2008_007788.png\r\n",
      "\n",
      "/PASCALContexts/2008_001007.png\r\n",
      "\n",
      "/PASCALContexts/2008_001205.png\r\n",
      "\n",
      "/PASCALContexts/2008_001021.png\r\n",
      "\n",
      "/PASCALContexts/2008_004422.png\r\n",
      "\n",
      "/PASCALContexts/2010_001012.png\r\n",
      "\n",
      "/PASCALContexts/2008_004768.png\r\n",
      "\n",
      "/PASCALContexts/2009_003732.png\r\n",
      "\n",
      "/PASCALContexts/2009_003181.png\r\n",
      "\n",
      "/PASCALContexts/2010_002995.png\r\n",
      "\n",
      "/PASCALContexts/2010_001310.png\r\n",
      "\n",
      "/PASCALContexts/2009_001329.png\r\n",
      "\n",
      "/PASCALContexts/2008_007998.png\r\n",
      "\n",
      "/PASCALContexts/2008_007134.png\r\n",
      "\n",
      "/PASCALContexts/2009_000793.png\r\n",
      "\n",
      "/PASCALContexts/2009_004169.png\r\n",
      "\n",
      "/PASCALContexts/2008_005283.png\r\n",
      "\n",
      "/PASCALContexts/2009_003598.png\r\n",
      "\n",
      "/PASCALContexts/2009_004942.png\r\n",
      "\n",
      "/PASCALContexts/2008_007410.png\r\n",
      "\n",
      "/PASCALContexts/2008_000021.png\r\n",
      "\n",
      "/PASCALContexts/2010_005820.png\r\n",
      "\n",
      "/PASCALContexts/2010_004415.png\r\n",
      "\n",
      "/PASCALContexts/2008_001838.png\r\n",
      "\n",
      "/PASCALContexts/2010_004951.png\r\n",
      "\n",
      "/PASCALContexts/2009_003801.png\r\n",
      "\n",
      "/PASCALContexts/2008_001551.png\r\n",
      "\n",
      "/PASCALContexts/2008_007947.png\r\n",
      "\n",
      "/PASCALContexts/2008_003676.png\r\n",
      "\n",
      "/PASCALContexts/2010_004624.png\r\n",
      "\n",
      "/PASCALContexts/2008_003776.png\r\n",
      "\n",
      "/PASCALContexts/2008_001290.png\r\n",
      "\n",
      "/PASCALContexts/2010_001292.png\r\n",
      "\n",
      "/PASCALContexts/2009_004921.png\r\n",
      "\n",
      "/PASCALContexts/2010_003520.png\r\n",
      "\n",
      "/PASCALContexts/2008_004318.png\r\n",
      "\n",
      "/PASCALContexts/2008_001661.png\r\n",
      "\n",
      "/PASCALContexts/2009_001806.png\r\n",
      "\n",
      "/PASCALContexts/2008_007435.png\r\n",
      "\n",
      "/PASCALContexts/2008_001190.png\r\n",
      "\n",
      "/PASCALContexts/2010_004466.png\r\n",
      "\n",
      "/PASCALContexts/2010_000655.png\r\n",
      "\n",
      "/PASCALContexts/2009_001990.png\r\n",
      "\n",
      "/PASCALContexts/2008_006872.png\r\n",
      "\n",
      "/PASCALContexts/2009_000641.png\r\n",
      "\n",
      "/PASCALContexts/2010_003910.png\r\n",
      "\n",
      "/PASCALContexts/2008_000828.png\r\n",
      "\n",
      "/PASCALContexts/2008_007084.png\r\n",
      "\n",
      "/PASCALContexts/2009_000928.png\r\n",
      "\n",
      "/PASCALContexts/2009_000283.png\r\n",
      "\n",
      "/PASCALContexts/2010_005974.png\r\n",
      "\n",
      "/PASCALContexts/2009_003806.png\r\n",
      "\n",
      "/PASCALContexts/2009_003350.png\r\n",
      "\n",
      "/PASCALContexts/2009_003799.png\r\n",
      "\n",
      "/PASCALContexts/2010_003539.png\r\n",
      "\n",
      "/PASCALContexts/2009_001964.png\r\n",
      "\n",
      "/PASCALContexts/2008_005072.png\r\n",
      "\n",
      "/PASCALContexts/2008_000348.png\r\n",
      "\n",
      "/PASCALContexts/2008_007476.png\r\n",
      "\n",
      "/PASCALContexts/2008_003101.png\r\n",
      "\n",
      "/PASCALContexts/2008_004513.png\r\n",
      "\n",
      "/PASCALContexts/2009_003415.png\r\n",
      "\n",
      "/PASCALContexts/2009_004934.png\r\n",
      "\n",
      "/PASCALContexts/2008_006489.png\r\n",
      "\n",
      "/PASCALContexts/2010_001550.png\r\n",
      "\n",
      "/PASCALContexts/2008_007611.png\r\n",
      "\n",
      "/PASCALContexts/2010_003762.png\r\n",
      "\n",
      "/PASCALContexts/2008_004469.png\r\n",
      "\n",
      "/PASCALContexts/2008_005641.png\r\n",
      "\n",
      "/PASCALContexts/2009_000011.png\r\n",
      "\n",
      "/PASCALContexts/2010_002979.png\r\n",
      "\n",
      "/PASCALContexts/2008_006188.png\r\n",
      "\n",
      "/PASCALContexts/2008_000837.png\r\n",
      "\n",
      "/PASCALContexts/2009_002388.png\r\n",
      "\n",
      "/PASCALContexts/2009_004857.png\r\n",
      "\n",
      "/PASCALContexts/2010_005275.png\r\n",
      "\n",
      "/PASCALContexts/2010_002537.png\r\n",
      "\n",
      "/PASCALContexts/2010_003062.png\r\n",
      "\n",
      "/PASCALContexts/2008_006207.png\r\n",
      "\n",
      "/PASCALContexts/2009_003156.png\r\n",
      "\n",
      "/PASCALContexts/2008_006067.png\r\n",
      "\n",
      "/PASCALContexts/2009_003416.png\r\n",
      "\n",
      "/PASCALContexts/2010_004104.png\r\n",
      "\n",
      "/PASCALContexts/2009_005005.png\r\n",
      "\n",
      "/PASCALContexts/2010_005957.png\r\n",
      "\n",
      "/PASCALContexts/2010_000076.png\r\n",
      "\n",
      "/PASCALContexts/2010_004523.png\r\n",
      "\n",
      "/PASCALContexts/2009_002077.png\r\n",
      "\n",
      "/PASCALContexts/2010_001364.png\r\n",
      "\n",
      "/PASCALContexts/2009_003944.png\r\n",
      "\n",
      "/PASCALContexts/2009_001074.png\r\n",
      "\n",
      "/PASCALContexts/2008_008476.png\r\n",
      "\n",
      "/PASCALContexts/2009_002216.png\r\n",
      "\n",
      "/PASCALContexts/2010_003415.png\r\n",
      "\n",
      "/PASCALContexts/2009_003142.png\r\n",
      "\n",
      "/PASCALContexts/2009_002127.png\r\n",
      "\n",
      "/PASCALContexts/2010_001572.png\r\n",
      "\n",
      "/PASCALContexts/2010_001814.png\r\n",
      "\n",
      "/PASCALContexts/2008_007514.png\r\n",
      "\n",
      "/PASCALContexts/2009_001100.png\r\n",
      "\n",
      "/PASCALContexts/2010_001569.png\r\n",
      "\n",
      "/PASCALContexts/2010_002431.png\r\n",
      "\n",
      "/PASCALContexts/2010_006015.png\r\n",
      "\n",
      "/PASCALContexts/2010_000797.png\r\n",
      "\n",
      "/PASCALContexts/2009_000820.png\r\n",
      "\n",
      "/PASCALContexts/2008_005976.png\r\n",
      "\n",
      "/PASCALContexts/2009_004174.png\r\n",
      "\n",
      "/PASCALContexts/2010_000782.png\r\n",
      "\n",
      "/PASCALContexts/2008_004232.png\r\n",
      "\n",
      "/PASCALContexts/2008_007221.png\r\n",
      "\n",
      "/PASCALContexts/2009_001308.png\r\n",
      "\n",
      "/PASCALContexts/2009_001184.png\r\n",
      "\n",
      "/PASCALContexts/2008_003288.png\r\n",
      "\n",
      "/PASCALContexts/2010_004777.png\r\n",
      "\n",
      "/PASCALContexts/2008_002558.png\r\n",
      "\n",
      "/PASCALContexts/2010_003950.png\r\n",
      "\n",
      "/PASCALContexts/2009_004052.png\r\n",
      "\n",
      "/PASCALContexts/2008_007949.png\n"
     ]
    }
   ],
   "source": [
    "f = open('/home/guo/deeplab_v2/pascal-context/list/val_500.txt','r')   \n",
    "t = open('/home/guo/deeplab_v2/pascal-context/list/val_500_touch.txt','w')\n",
    "lines = f.readlines()\n",
    "\n",
    "for line in lines:\n",
    "    stopkey=line.split(' ',1)\n",
    "    t.write(stopkey[1])\n",
    "    print stopkey[1]\n",
    "    #print '['+stopkey[0]+']'\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 单行数据增加识别号"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2007_000033\n",
      "2007_000042\n",
      "2007_000061\n",
      "2007_000123\n",
      "2007_000129\n",
      "2007_000175\n",
      "2007_000187\n",
      "2007_000323\n",
      "2007_000332\n",
      "2007_000346\n",
      "2007_000452\n",
      "2007_000464\n",
      "2007_000491\n",
      "2007_000529\n",
      "2007_000559\n",
      "2007_000572\n",
      "2007_000629\n",
      "2007_000636\n",
      "2007_000661\n",
      "2007_000663\n",
      "2007_000676\n",
      "2007_000727\n",
      "2007_000762\n",
      "2007_000783\n",
      "2007_000799\n",
      "2007_000804\n",
      "2007_000830\n",
      "2007_000837\n",
      "2007_000847\n",
      "2007_000862\n",
      "2007_000925\n",
      "2007_000999\n",
      "2007_001154\n",
      "2007_001175\n",
      "2007_001239\n",
      "2007_001284\n",
      "2007_001288\n",
      "2007_001289\n",
      "2007_001299\n",
      "2007_001311\n",
      "2007_001321\n",
      "2007_001377\n",
      "2007_001408\n",
      "2007_001423\n",
      "2007_001430\n",
      "2007_001457\n",
      "2007_001458\n",
      "2007_001526\n",
      "2007_001568\n",
      "2007_001585\n",
      "2007_001586\n",
      "2007_001587\n",
      "2007_001594\n",
      "2007_001630\n",
      "2007_001677\n",
      "2007_001678\n",
      "2007_001717\n",
      "2007_001733\n",
      "2007_001761\n",
      "2007_001763\n",
      "2007_001774\n",
      "2007_001884\n",
      "2007_001955\n",
      "2007_002046\n",
      "2007_002094\n",
      "2007_002119\n",
      "2007_002132\n",
      "2007_002260\n",
      "2007_002266\n",
      "2007_002268\n",
      "2007_002284\n",
      "2007_002376\n",
      "2007_002378\n",
      "2007_002387\n",
      "2007_002400\n",
      "2007_002412\n",
      "2007_002426\n",
      "2007_002427\n",
      "2007_002445\n",
      "2007_002470\n",
      "2007_002539\n",
      "2007_002565\n",
      "2007_002597\n",
      "2007_002618\n",
      "2007_002619\n",
      "2007_002624\n",
      "2007_002643\n",
      "2007_002648\n",
      "2007_002719\n",
      "2007_002728\n",
      "2007_002823\n",
      "2007_002824\n",
      "2007_002852\n",
      "2007_002903\n",
      "2007_003011\n",
      "2007_003020\n",
      "2007_003022\n",
      "2007_003051\n",
      "2007_003088\n",
      "2007_003101\n",
      "2007_003106\n",
      "2007_003110\n",
      "2007_003131\n",
      "2007_003134\n",
      "2007_003137\n",
      "2007_003143\n",
      "2007_003169\n",
      "2007_003188\n",
      "2007_003194\n",
      "2007_003195\n",
      "2007_003201\n",
      "2007_003349\n",
      "2007_003367\n",
      "2007_003373\n",
      "2007_003499\n",
      "2007_003503\n",
      "2007_003506\n",
      "2007_003530\n",
      "2007_003571\n",
      "2007_003587\n",
      "2007_003611\n",
      "2007_003621\n",
      "2007_003682\n",
      "2007_003711\n",
      "2007_003714\n",
      "2007_003742\n",
      "2007_003786\n",
      "2007_003841\n",
      "2007_003848\n",
      "2007_003861\n",
      "2007_003872\n",
      "2007_003917\n",
      "2007_003957\n",
      "2007_003991\n",
      "2007_004033\n",
      "2007_004052\n",
      "2007_004112\n",
      "2007_004121\n",
      "2007_004143\n",
      "2007_004189\n",
      "2007_004190\n",
      "2007_004193\n",
      "2007_004241\n",
      "2007_004275\n",
      "2007_004281\n",
      "2007_004380\n",
      "2007_004392\n",
      "2007_004405\n",
      "2007_004468\n",
      "2007_004483\n",
      "2007_004510\n",
      "2007_004538\n",
      "2007_004558\n",
      "2007_004644\n",
      "2007_004649\n",
      "2007_004712\n",
      "2007_004722\n",
      "2007_004856\n",
      "2007_004866\n",
      "2007_004902\n",
      "2007_004969\n",
      "2007_005058\n",
      "2007_005074\n",
      "2007_005107\n",
      "2007_005114\n",
      "2007_005149\n",
      "2007_005173\n",
      "2007_005281\n",
      "2007_005294\n",
      "2007_005296\n",
      "2007_005304\n",
      "2007_005331\n",
      "2007_005354\n",
      "2007_005358\n",
      "2007_005428\n",
      "2007_005460\n",
      "2007_005469\n",
      "2007_005509\n",
      "2007_005547\n",
      "2007_005600\n",
      "2007_005608\n",
      "2007_005626\n",
      "2007_005689\n",
      "2007_005696\n",
      "2007_005705\n",
      "2007_005759\n",
      "2007_005803\n",
      "2007_005813\n",
      "2007_005828\n",
      "2007_005844\n",
      "2007_005845\n",
      "2007_005857\n",
      "2007_005911\n",
      "2007_005915\n",
      "2007_005978\n",
      "2007_006028\n",
      "2007_006035\n",
      "2007_006046\n",
      "2007_006076\n",
      "2007_006086\n",
      "2007_006117\n",
      "2007_006171\n",
      "2007_006241\n",
      "2007_006260\n",
      "2007_006277\n",
      "2007_006348\n",
      "2007_006364\n",
      "2007_006373\n",
      "2007_006444\n",
      "2007_006449\n",
      "2007_006549\n",
      "2007_006553\n",
      "2007_006560\n",
      "2007_006647\n",
      "2007_006678\n",
      "2007_006680\n",
      "2007_006698\n",
      "2007_006761\n",
      "2007_006802\n",
      "2007_006837\n",
      "2007_006841\n",
      "2007_006864\n",
      "2007_006866\n",
      "2007_006946\n",
      "2007_007007\n",
      "2007_007084\n",
      "2007_007109\n",
      "2007_007130\n",
      "2007_007165\n",
      "2007_007168\n",
      "2007_007195\n",
      "2007_007196\n",
      "2007_007203\n",
      "2007_007211\n",
      "2007_007235\n",
      "2007_007341\n",
      "2007_007414\n",
      "2007_007417\n",
      "2007_007470\n",
      "2007_007477\n",
      "2007_007493\n",
      "2007_007498\n",
      "2007_007524\n",
      "2007_007534\n",
      "2007_007624\n",
      "2007_007651\n",
      "2007_007688\n",
      "2007_007748\n",
      "2007_007795\n",
      "2007_007810\n",
      "2007_007815\n",
      "2007_007818\n",
      "2007_007836\n",
      "2007_007849\n",
      "2007_007881\n",
      "2007_007996\n",
      "2007_008051\n",
      "2007_008084\n",
      "2007_008106\n",
      "2007_008110\n",
      "2007_008204\n",
      "2007_008222\n",
      "2007_008256\n",
      "2007_008260\n",
      "2007_008339\n",
      "2007_008374\n",
      "2007_008415\n",
      "2007_008430\n",
      "2007_008543\n",
      "2007_008547\n",
      "2007_008596\n",
      "2007_008645\n",
      "2007_008670\n",
      "2007_008708\n",
      "2007_008722\n",
      "2007_008747\n",
      "2007_008802\n",
      "2007_008815\n",
      "2007_008897\n",
      "2007_008944\n",
      "2007_008964\n",
      "2007_008973\n",
      "2007_008980\n",
      "2007_009015\n",
      "2007_009068\n",
      "2007_009084\n",
      "2007_009088\n",
      "2007_009096\n",
      "2007_009221\n",
      "2007_009245\n",
      "2007_009251\n",
      "2007_009252\n",
      "2007_009258\n",
      "2007_009320\n",
      "2007_009323\n",
      "2007_009331\n",
      "2007_009346\n",
      "2007_009392\n",
      "2007_009413\n",
      "2007_009419\n",
      "2007_009446\n",
      "2007_009458\n",
      "2007_009521\n",
      "2007_009562\n",
      "2007_009592\n",
      "2007_009654\n",
      "2007_009655\n",
      "2007_009684\n",
      "2007_009687\n",
      "2007_009691\n",
      "2007_009706\n",
      "2007_009750\n",
      "2007_009756\n",
      "2007_009764\n",
      "2007_009794\n",
      "2007_009817\n",
      "2007_009841\n",
      "2007_009897\n",
      "2007_009911\n",
      "2007_009923\n",
      "2007_009938\n",
      "2008_000009\n",
      "2008_000016\n",
      "2008_000073\n",
      "2008_000075\n",
      "2008_000080\n",
      "2008_000107\n",
      "2008_000120\n",
      "2008_000123\n",
      "2008_000149\n",
      "2008_000182\n",
      "2008_000213\n",
      "2008_000215\n",
      "2008_000223\n",
      "2008_000233\n",
      "2008_000234\n",
      "2008_000239\n",
      "2008_000254\n",
      "2008_000270\n",
      "2008_000271\n",
      "2008_000345\n",
      "2008_000359\n",
      "2008_000391\n",
      "2008_000401\n",
      "2008_000464\n",
      "2008_000469\n",
      "2008_000474\n",
      "2008_000501\n",
      "2008_000510\n",
      "2008_000533\n",
      "2008_000573\n",
      "2008_000589\n",
      "2008_000602\n",
      "2008_000630\n",
      "2008_000657\n",
      "2008_000661\n",
      "2008_000662\n",
      "2008_000666\n",
      "2008_000673\n",
      "2008_000700\n",
      "2008_000725\n",
      "2008_000731\n",
      "2008_000763\n",
      "2008_000765\n",
      "2008_000782\n",
      "2008_000795\n",
      "2008_000811\n",
      "2008_000848\n",
      "2008_000853\n",
      "2008_000863\n",
      "2008_000911\n",
      "2008_000919\n",
      "2008_000943\n",
      "2008_000992\n",
      "2008_001013\n",
      "2008_001028\n",
      "2008_001040\n",
      "2008_001070\n",
      "2008_001074\n",
      "2008_001076\n",
      "2008_001078\n",
      "2008_001135\n",
      "2008_001150\n",
      "2008_001170\n",
      "2008_001231\n",
      "2008_001249\n",
      "2008_001260\n",
      "2008_001283\n",
      "2008_001308\n",
      "2008_001379\n",
      "2008_001404\n",
      "2008_001433\n",
      "2008_001439\n",
      "2008_001478\n",
      "2008_001491\n",
      "2008_001504\n",
      "2008_001513\n",
      "2008_001514\n",
      "2008_001531\n",
      "2008_001546\n",
      "2008_001547\n",
      "2008_001580\n",
      "2008_001629\n",
      "2008_001640\n",
      "2008_001682\n",
      "2008_001688\n",
      "2008_001715\n",
      "2008_001821\n",
      "2008_001874\n",
      "2008_001885\n",
      "2008_001895\n",
      "2008_001966\n",
      "2008_001971\n",
      "2008_001992\n",
      "2008_002043\n",
      "2008_002152\n",
      "2008_002205\n",
      "2008_002212\n",
      "2008_002239\n",
      "2008_002240\n",
      "2008_002241\n",
      "2008_002269\n",
      "2008_002273\n",
      "2008_002358\n",
      "2008_002379\n",
      "2008_002383\n",
      "2008_002429\n",
      "2008_002464\n",
      "2008_002467\n",
      "2008_002492\n",
      "2008_002495\n",
      "2008_002504\n",
      "2008_002521\n",
      "2008_002536\n",
      "2008_002588\n",
      "2008_002623\n",
      "2008_002680\n",
      "2008_002681\n",
      "2008_002775\n",
      "2008_002778\n",
      "2008_002835\n",
      "2008_002859\n",
      "2008_002864\n",
      "2008_002900\n",
      "2008_002904\n",
      "2008_002929\n",
      "2008_002936\n",
      "2008_002942\n",
      "2008_002958\n",
      "2008_003003\n",
      "2008_003026\n",
      "2008_003034\n",
      "2008_003076\n",
      "2008_003105\n",
      "2008_003108\n",
      "2008_003110\n",
      "2008_003135\n",
      "2008_003141\n",
      "2008_003155\n",
      "2008_003210\n",
      "2008_003238\n",
      "2008_003270\n",
      "2008_003330\n",
      "2008_003333\n",
      "2008_003369\n",
      "2008_003379\n",
      "2008_003451\n",
      "2008_003461\n",
      "2008_003477\n",
      "2008_003492\n",
      "2008_003499\n",
      "2008_003511\n",
      "2008_003546\n",
      "2008_003576\n",
      "2008_003577\n",
      "2008_003676\n",
      "2008_003709\n",
      "2008_003733\n",
      "2008_003777\n",
      "2008_003782\n",
      "2008_003821\n",
      "2008_003846\n",
      "2008_003856\n",
      "2008_003858\n",
      "2008_003874\n",
      "2008_003876\n",
      "2008_003885\n",
      "2008_003886\n",
      "2008_003926\n",
      "2008_003976\n",
      "2008_004069\n",
      "2008_004101\n",
      "2008_004140\n",
      "2008_004172\n",
      "2008_004175\n",
      "2008_004212\n",
      "2008_004279\n",
      "2008_004339\n",
      "2008_004345\n",
      "2008_004363\n"
     ]
    }
   ],
   "source": [
    "f = open('/home/guo/deeplab_v2/pascal-context/list/val_500_id.txt','r')   \n",
    "t = open('/home/guo/deeplab_v2/pascal-context/list/val_500_want.txt','w')\n",
    "lines = f.readlines()\n",
    "\n",
    "for line in lines:\n",
    "    stopkey=line.split('\\n',1)\n",
    "    t.write(stopkey[0]+\".png\\n\")\n",
    "    print stopkey[0]\n",
    "    #print '['+stopkey[0]+']'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 提取出原名字"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2009_004368\n",
      "2010_002638\n",
      "2009_001542\n",
      "2009_002419\n",
      "2010_003534\n",
      "2008_002811\n",
      "2010_000495\n",
      "2010_002499\n",
      "2009_000453\n",
      "2008_007189\n",
      "2008_000233\n",
      "2010_005238\n",
      "2008_006462\n",
      "2010_004143\n",
      "2009_000136\n",
      "2009_003822\n",
      "2009_003666\n",
      "2010_002794\n",
      "2010_003931\n",
      "2009_002833\n",
      "2008_005433\n",
      "2010_004691\n",
      "2010_000647\n",
      "2010_002337\n",
      "2008_001523\n",
      "2010_001204\n",
      "2008_008095\n",
      "2010_001669\n",
      "2008_002873\n",
      "2008_002145\n",
      "2008_004457\n",
      "2008_003547\n",
      "2010_003092\n",
      "2008_007692\n",
      "2008_001741\n",
      "2008_004583\n",
      "2009_001783\n",
      "2009_003816\n",
      "2008_003624\n",
      "2010_002692\n",
      "2008_008666\n",
      "2009_000628\n",
      "2009_003950\n",
      "2008_006369\n",
      "2008_000174\n",
      "2010_002614\n",
      "2008_005245\n",
      "2008_007579\n",
      "2008_000908\n",
      "2010_005640\n",
      "2010_001710\n",
      "2008_000195\n",
      "2010_005805\n",
      "2009_005149\n",
      "2008_000806\n",
      "2010_004306\n",
      "2009_003753\n",
      "2008_000471\n",
      "2008_004621\n",
      "2009_003863\n",
      "2010_005152\n",
      "2008_004452\n",
      "2008_005874\n",
      "2009_004093\n",
      "2010_005543\n",
      "2010_004857\n",
      "2009_000377\n",
      "2010_004959\n",
      "2008_005101\n",
      "2009_004601\n",
      "2009_002960\n",
      "2010_001333\n",
      "2008_004754\n",
      "2009_004193\n",
      "2008_000700\n",
      "2009_001910\n",
      "2009_000931\n",
      "2008_008676\n",
      "2008_005065\n",
      "2008_008668\n",
      "2008_005764\n",
      "2009_005036\n",
      "2008_005574\n",
      "2009_003222\n",
      "2008_000711\n",
      "2010_003828\n",
      "2010_005386\n",
      "2010_001448\n",
      "2008_001395\n",
      "2009_004417\n",
      "2010_004105\n",
      "2008_004410\n",
      "2009_001980\n",
      "2009_001623\n",
      "2010_005432\n",
      "2009_005294\n",
      "2010_002333\n",
      "2009_003265\n",
      "2008_006793\n",
      "2009_003455\n",
      "2008_006746\n",
      "2008_006438\n",
      "2008_004138\n",
      "2008_001278\n",
      "2009_004016\n",
      "2010_003078\n",
      "2009_001740\n",
      "2009_004836\n",
      "2008_002590\n",
      "2009_000471\n",
      "2009_000562\n",
      "2008_002329\n",
      "2008_007635\n",
      "2008_001235\n",
      "2010_001893\n",
      "2008_000026\n",
      "2008_002804\n",
      "2008_007197\n",
      "2010_003800\n",
      "2010_005457\n",
      "2009_001268\n",
      "2010_004141\n",
      "2010_005332\n",
      "2009_000192\n",
      "2010_001399\n",
      "2010_003609\n",
      "2010_002526\n",
      "2010_000033\n",
      "2010_004656\n",
      "2008_002725\n",
      "2008_003814\n",
      "2008_005603\n",
      "2008_002985\n",
      "2008_005109\n",
      "2010_001253\n",
      "2009_001593\n",
      "2008_004006\n",
      "2008_001704\n",
      "2008_004243\n",
      "2008_006920\n",
      "2010_005346\n",
      "2009_005128\n",
      "2009_000216\n",
      "2008_007291\n",
      "2008_005699\n",
      "2010_000743\n",
      "2010_000139\n",
      "2008_008746\n",
      "2008_003041\n",
      "2010_003987\n",
      "2008_005679\n",
      "2009_000723\n",
      "2008_004427\n",
      "2010_001715\n",
      "2008_000373\n",
      "2009_002837\n",
      "2008_004110\n",
      "2010_005429\n",
      "2009_000759\n",
      "2009_002632\n",
      "2010_005676\n",
      "2008_005748\n",
      "2008_006631\n",
      "2010_004219\n",
      "2009_003537\n",
      "2010_005606\n",
      "2010_002392\n",
      "2008_003521\n",
      "2008_004071\n",
      "2008_004406\n",
      "2009_004202\n",
      "2009_001747\n",
      "2008_006708\n",
      "2008_008012\n",
      "2008_006064\n",
      "2008_004766\n",
      "2010_004558\n",
      "2010_002085\n",
      "2009_004556\n",
      "2009_000293\n",
      "2009_003071\n",
      "2009_004631\n",
      "2008_004258\n",
      "2008_008070\n",
      "2008_002467\n",
      "2009_000815\n",
      "2009_004148\n",
      "2010_004204\n",
      "2008_007286\n",
      "2009_002372\n",
      "2009_002192\n",
      "2010_001002\n",
      "2008_008080\n",
      "2010_002369\n",
      "2008_004416\n",
      "2009_004468\n",
      "2008_005361\n",
      "2008_006052\n",
      "2010_005071\n",
      "2008_002672\n",
      "2008_008393\n",
      "2008_004518\n",
      "2008_007739\n",
      "2009_003827\n",
      "2008_007640\n",
      "2008_002428\n",
      "2008_006912\n",
      "2008_004015\n",
      "2009_002242\n",
      "2010_004506\n",
      "2009_005025\n",
      "2009_000708\n",
      "2008_008021\n",
      "2009_002681\n",
      "2008_008423\n",
      "2010_002954\n",
      "2010_003197\n",
      "2008_002801\n",
      "2009_003199\n",
      "2008_006949\n",
      "2008_003323\n",
      "2010_005406\n",
      "2009_001884\n",
      "2010_000234\n",
      "2008_000981\n",
      "2008_004984\n",
      "2010_003547\n",
      "2008_003763\n",
      "2008_006424\n",
      "2008_005758\n",
      "2009_002629\n",
      "2008_001825\n",
      "2009_002648\n",
      "2010_001687\n",
      "2009_000419\n",
      "2010_003725\n",
      "2008_000251\n",
      "2010_005877\n",
      "2010_001808\n",
      "2008_006509\n",
      "2008_005257\n",
      "2009_003793\n",
      "2010_002113\n",
      "2008_000982\n",
      "2010_004179\n",
      "2008_006953\n",
      "2008_007864\n",
      "2008_002972\n",
      "2008_001160\n",
      "2009_001570\n",
      "2008_007610\n",
      "2008_001142\n",
      "2010_003854\n",
      "2008_006441\n",
      "2009_000171\n",
      "2008_004378\n",
      "2009_005152\n",
      "2010_002274\n",
      "2008_006700\n",
      "2010_002830\n",
      "2008_001666\n",
      "2008_005979\n",
      "2010_006023\n",
      "2008_003067\n",
      "2010_000590\n",
      "2009_000500\n",
      "2009_003961\n",
      "2010_000401\n",
      "2010_000711\n",
      "2008_002280\n",
      "2010_001868\n",
      "2008_005035\n",
      "2009_000742\n",
      "2008_005431\n",
      "2010_001732\n",
      "2009_002695\n",
      "2010_004878\n",
      "2009_002221\n",
      "2008_008382\n",
      "2008_006285\n",
      "2009_001133\n",
      "2010_005906\n",
      "2010_003252\n",
      "2010_002497\n",
      "2009_001509\n",
      "2008_003107\n",
      "2008_003753\n",
      "2008_003589\n",
      "2008_005566\n",
      "2008_005451\n",
      "2008_002852\n",
      "2009_001780\n",
      "2010_000578\n",
      "2008_008600\n",
      "2009_004133\n",
      "2008_004907\n",
      "2008_000910\n",
      "2008_007690\n",
      "2010_004149\n",
      "2008_000123\n",
      "2009_000385\n",
      "2010_004198\n",
      "2009_003259\n",
      "2008_003579\n",
      "2009_002348\n",
      "2008_007239\n",
      "2010_005026\n",
      "2010_006057\n",
      "2009_004440\n",
      "2010_001739\n",
      "2009_000145\n",
      "2008_007750\n",
      "2008_004665\n",
      "2009_003490\n",
      "2009_001369\n",
      "2010_001189\n",
      "2008_001781\n",
      "2008_007293\n",
      "2010_000498\n",
      "2010_003728\n",
      "2009_001758\n",
      "2009_004361\n",
      "2010_000110\n",
      "2009_001249\n",
      "2008_006968\n",
      "2010_002684\n",
      "2009_000629\n",
      "2008_005376\n",
      "2010_006062\n",
      "2008_007515\n",
      "2008_002856\n",
      "2009_003656\n",
      "2009_002445\n",
      "2008_001866\n",
      "2009_002749\n",
      "2008_008319\n",
      "2008_000187\n",
      "2009_002145\n",
      "2008_006797\n",
      "2008_002052\n",
      "2009_001810\n",
      "2010_005596\n",
      "2008_002495\n",
      "2008_000376\n",
      "2010_004451\n",
      "2009_001006\n",
      "2009_003271\n",
      "2008_008342\n",
      "2009_002570\n",
      "2009_003316\n",
      "2010_001850\n",
      "2009_002524\n",
      "2009_002097\n",
      "2008_008296\n",
      "2010_000133\n",
      "2008_008122\n",
      "2009_001374\n",
      "2008_003076\n",
      "2009_004784\n",
      "2008_007163\n",
      "2009_004518\n",
      "2008_001586\n",
      "2009_001937\n",
      "2009_003052\n",
      "2009_004031\n",
      "2009_002912\n",
      "2009_002558\n",
      "2008_006705\n",
      "2008_002954\n",
      "2009_005056\n",
      "2008_004462\n",
      "2008_000723\n",
      "2010_000524\n",
      "2008_005247\n",
      "2010_000942\n",
      "2009_002698\n",
      "2009_002299\n",
      "2009_003269\n",
      "2010_001425\n",
      "2008_001481\n",
      "2008_004656\n",
      "2010_002742\n",
      "2008_007788\n",
      "2008_001007\n",
      "2008_001205\n",
      "2008_001021\n",
      "2008_004422\n",
      "2010_001012\n",
      "2008_004768\n",
      "2009_003732\n",
      "2009_003181\n",
      "2010_002995\n",
      "2010_001310\n",
      "2009_001329\n",
      "2008_007998\n",
      "2008_007134\n",
      "2009_000793\n",
      "2009_004169\n",
      "2008_005283\n",
      "2009_003598\n",
      "2009_004942\n",
      "2008_007410\n",
      "2008_000021\n",
      "2010_005820\n",
      "2010_004415\n",
      "2008_001838\n",
      "2010_004951\n",
      "2009_003801\n",
      "2008_001551\n",
      "2008_007947\n",
      "2008_003676\n",
      "2010_004624\n",
      "2008_003776\n",
      "2008_001290\n",
      "2010_001292\n",
      "2009_004921\n",
      "2010_003520\n",
      "2008_004318\n",
      "2008_001661\n",
      "2009_001806\n",
      "2008_007435\n",
      "2008_001190\n",
      "2010_004466\n",
      "2010_000655\n",
      "2009_001990\n",
      "2008_006872\n",
      "2009_000641\n",
      "2010_003910\n",
      "2008_000828\n",
      "2008_007084\n",
      "2009_000928\n",
      "2009_000283\n",
      "2010_005974\n",
      "2009_003806\n",
      "2009_003350\n",
      "2009_003799\n",
      "2010_003539\n",
      "2009_001964\n",
      "2008_005072\n",
      "2008_000348\n",
      "2008_007476\n",
      "2008_003101\n",
      "2008_004513\n",
      "2009_003415\n",
      "2009_004934\n",
      "2008_006489\n",
      "2010_001550\n",
      "2008_007611\n",
      "2010_003762\n",
      "2008_004469\n",
      "2008_005641\n",
      "2009_000011\n",
      "2010_002979\n",
      "2008_006188\n",
      "2008_000837\n",
      "2009_002388\n",
      "2009_004857\n",
      "2010_005275\n",
      "2010_002537\n",
      "2010_003062\n",
      "2008_006207\n",
      "2009_003156\n",
      "2008_006067\n",
      "2009_003416\n",
      "2010_004104\n",
      "2009_005005\n",
      "2010_005957\n",
      "2010_000076\n",
      "2010_004523\n",
      "2009_002077\n",
      "2010_001364\n",
      "2009_003944\n",
      "2009_001074\n",
      "2008_008476\n",
      "2009_002216\n",
      "2010_003415\n",
      "2009_003142\n",
      "2009_002127\n",
      "2010_001572\n",
      "2010_001814\n",
      "2008_007514\n",
      "2009_001100\n",
      "2010_001569\n",
      "2010_002431\n",
      "2010_006015\n",
      "2010_000797\n",
      "2009_000820\n",
      "2008_005976\n",
      "2009_004174\n",
      "2010_000782\n",
      "2008_004232\n",
      "2008_007221\n",
      "2009_001308\n",
      "2009_001184\n",
      "2008_003288\n",
      "2010_004777\n",
      "2008_002558\n",
      "2010_003950\n",
      "2009_004052\n",
      "2008_007949\n"
     ]
    }
   ],
   "source": [
    "t = open('/home/guo/deeplab_v2/pascal-context/list/val_500_touch.txt','r')\n",
    "f = open('/home/guo/deeplab_v2/pascal-context/list/val_500_touch_1.txt','w')\n",
    "tlines = t.readlines()\n",
    "for afile in tlines:   \n",
    "    mat_idx=afile[16:afile.find('.png')]\n",
    "    f.write(mat_idx+\"\\n\") #\" #\\n\")\n",
    "    print mat_idx"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 两个文件并排存成单行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2007_000033\n",
      "2007_000042\n",
      "2007_000061\n",
      "2007_000123\n",
      "2007_000129\n",
      "2007_000175\n",
      "2007_000187\n",
      "2007_000323\n",
      "2007_000332\n",
      "2007_000346\n",
      "2007_000452\n",
      "2007_000464\n",
      "2007_000491\n",
      "2007_000529\n",
      "2007_000559\n",
      "2007_000572\n",
      "2007_000629\n",
      "2007_000636\n",
      "2007_000661\n",
      "2007_000663\n",
      "2007_000676\n",
      "2007_000727\n",
      "2007_000762\n",
      "2007_000783\n",
      "2007_000799\n",
      "2007_000804\n",
      "2007_000830\n",
      "2007_000837\n",
      "2007_000847\n",
      "2007_000862\n",
      "2007_000925\n",
      "2007_000999\n",
      "2007_001154\n",
      "2007_001175\n",
      "2007_001239\n",
      "2007_001284\n",
      "2007_001288\n",
      "2007_001289\n",
      "2007_001299\n",
      "2007_001311\n",
      "2007_001321\n",
      "2007_001377\n",
      "2007_001408\n",
      "2007_001423\n",
      "2007_001430\n",
      "2007_001457\n",
      "2007_001458\n",
      "2007_001526\n",
      "2007_001568\n",
      "2007_001585\n",
      "2007_001586\n",
      "2007_001587\n",
      "2007_001594\n",
      "2007_001630\n",
      "2007_001677\n",
      "2007_001678\n",
      "2007_001717\n",
      "2007_001733\n",
      "2007_001761\n",
      "2007_001763\n",
      "2007_001774\n",
      "2007_001884\n",
      "2007_001955\n",
      "2007_002046\n",
      "2007_002094\n",
      "2007_002119\n",
      "2007_002132\n",
      "2007_002260\n",
      "2007_002266\n",
      "2007_002268\n",
      "2007_002284\n",
      "2007_002376\n",
      "2007_002378\n",
      "2007_002387\n",
      "2007_002400\n",
      "2007_002412\n",
      "2007_002426\n",
      "2007_002427\n",
      "2007_002445\n",
      "2007_002470\n",
      "2007_002539\n",
      "2007_002565\n",
      "2007_002597\n",
      "2007_002618\n",
      "2007_002619\n",
      "2007_002624\n",
      "2007_002643\n",
      "2007_002648\n",
      "2007_002719\n",
      "2007_002728\n",
      "2007_002823\n",
      "2007_002824\n",
      "2007_002852\n",
      "2007_002903\n",
      "2007_003011\n",
      "2007_003020\n",
      "2007_003022\n",
      "2007_003051\n",
      "2007_003088\n",
      "2007_003101\n",
      "2007_003106\n",
      "2007_003110\n",
      "2007_003131\n",
      "2007_003134\n",
      "2007_003137\n",
      "2007_003143\n",
      "2007_003169\n",
      "2007_003188\n",
      "2007_003194\n",
      "2007_003195\n",
      "2007_003201\n",
      "2007_003349\n",
      "2007_003367\n",
      "2007_003373\n",
      "2007_003499\n",
      "2007_003503\n",
      "2007_003506\n",
      "2007_003530\n",
      "2007_003571\n",
      "2007_003587\n",
      "2007_003611\n",
      "2007_003621\n",
      "2007_003682\n",
      "2007_003711\n",
      "2007_003714\n",
      "2007_003742\n",
      "2007_003786\n",
      "2007_003841\n",
      "2007_003848\n",
      "2007_003861\n",
      "2007_003872\n",
      "2007_003917\n",
      "2007_003957\n",
      "2007_003991\n",
      "2007_004033\n",
      "2007_004052\n",
      "2007_004112\n",
      "2007_004121\n",
      "2007_004143\n",
      "2007_004189\n",
      "2007_004190\n",
      "2007_004193\n",
      "2007_004241\n",
      "2007_004275\n",
      "2007_004281\n",
      "2007_004380\n",
      "2007_004392\n",
      "2007_004405\n",
      "2007_004468\n",
      "2007_004483\n",
      "2007_004510\n",
      "2007_004538\n",
      "2007_004558\n",
      "2007_004644\n",
      "2007_004649\n",
      "2007_004712\n",
      "2007_004722\n",
      "2007_004856\n",
      "2007_004866\n",
      "2007_004902\n",
      "2007_004969\n",
      "2007_005058\n",
      "2007_005074\n",
      "2007_005107\n",
      "2007_005114\n",
      "2007_005149\n",
      "2007_005173\n",
      "2007_005281\n",
      "2007_005294\n",
      "2007_005296\n",
      "2007_005304\n",
      "2007_005331\n",
      "2007_005354\n",
      "2007_005358\n",
      "2007_005428\n",
      "2007_005460\n",
      "2007_005469\n",
      "2007_005509\n",
      "2007_005547\n",
      "2007_005600\n",
      "2007_005608\n",
      "2007_005626\n",
      "2007_005689\n",
      "2007_005696\n",
      "2007_005705\n",
      "2007_005759\n",
      "2007_005803\n",
      "2007_005813\n",
      "2007_005828\n",
      "2007_005844\n",
      "2007_005845\n",
      "2007_005857\n",
      "2007_005911\n",
      "2007_005915\n",
      "2007_005978\n",
      "2007_006028\n",
      "2007_006035\n",
      "2007_006046\n",
      "2007_006076\n",
      "2007_006086\n",
      "2007_006117\n",
      "2007_006171\n",
      "2007_006241\n",
      "2007_006260\n",
      "2007_006277\n",
      "2007_006348\n",
      "2007_006364\n",
      "2007_006373\n",
      "2007_006444\n",
      "2007_006449\n",
      "2007_006549\n",
      "2007_006553\n",
      "2007_006560\n",
      "2007_006647\n",
      "2007_006678\n",
      "2007_006680\n",
      "2007_006698\n",
      "2007_006761\n",
      "2007_006802\n",
      "2007_006837\n",
      "2007_006841\n",
      "2007_006864\n",
      "2007_006866\n",
      "2007_006946\n",
      "2007_007007\n",
      "2007_007084\n",
      "2007_007109\n",
      "2007_007130\n",
      "2007_007165\n",
      "2007_007168\n",
      "2007_007195\n",
      "2007_007196\n",
      "2007_007203\n",
      "2007_007211\n",
      "2007_007235\n",
      "2007_007341\n",
      "2007_007414\n",
      "2007_007417\n",
      "2007_007470\n",
      "2007_007477\n",
      "2007_007493\n",
      "2007_007498\n",
      "2007_007524\n",
      "2007_007534\n",
      "2007_007624\n",
      "2007_007651\n",
      "2007_007688\n",
      "2007_007748\n",
      "2007_007795\n",
      "2007_007810\n",
      "2007_007815\n",
      "2007_007818\n",
      "2007_007836\n",
      "2007_007849\n",
      "2007_007881\n",
      "2007_007996\n",
      "2007_008051\n",
      "2007_008084\n",
      "2007_008106\n",
      "2007_008110\n",
      "2007_008204\n",
      "2007_008222\n",
      "2007_008256\n",
      "2007_008260\n",
      "2007_008339\n",
      "2007_008374\n",
      "2007_008415\n",
      "2007_008430\n",
      "2007_008543\n",
      "2007_008547\n",
      "2007_008596\n",
      "2007_008645\n",
      "2007_008670\n",
      "2007_008708\n",
      "2007_008722\n",
      "2007_008747\n",
      "2007_008802\n",
      "2007_008815\n",
      "2007_008897\n",
      "2007_008944\n",
      "2007_008964\n",
      "2007_008973\n",
      "2007_008980\n",
      "2007_009015\n",
      "2007_009068\n",
      "2007_009084\n",
      "2007_009088\n",
      "2007_009096\n",
      "2007_009221\n",
      "2007_009245\n",
      "2007_009251\n",
      "2007_009252\n",
      "2007_009258\n",
      "2007_009320\n",
      "2007_009323\n",
      "2007_009331\n",
      "2007_009346\n",
      "2007_009392\n",
      "2007_009413\n",
      "2007_009419\n",
      "2007_009446\n",
      "2007_009458\n",
      "2007_009521\n",
      "2007_009562\n",
      "2007_009592\n",
      "2007_009654\n",
      "2007_009655\n",
      "2007_009684\n",
      "2007_009687\n",
      "2007_009691\n",
      "2007_009706\n",
      "2007_009750\n",
      "2007_009756\n",
      "2007_009764\n",
      "2007_009794\n",
      "2007_009817\n",
      "2007_009841\n",
      "2007_009897\n",
      "2007_009911\n",
      "2007_009923\n",
      "2007_009938\n",
      "2008_000009\n",
      "2008_000016\n",
      "2008_000073\n",
      "2008_000075\n",
      "2008_000080\n",
      "2008_000107\n",
      "2008_000120\n",
      "2008_000123\n",
      "2008_000149\n",
      "2008_000182\n",
      "2008_000213\n",
      "2008_000215\n",
      "2008_000223\n",
      "2008_000233\n",
      "2008_000234\n",
      "2008_000239\n",
      "2008_000254\n",
      "2008_000270\n",
      "2008_000271\n",
      "2008_000345\n",
      "2008_000359\n",
      "2008_000391\n",
      "2008_000401\n",
      "2008_000464\n",
      "2008_000469\n",
      "2008_000474\n",
      "2008_000501\n",
      "2008_000510\n",
      "2008_000533\n",
      "2008_000573\n",
      "2008_000589\n",
      "2008_000602\n",
      "2008_000630\n",
      "2008_000657\n",
      "2008_000661\n",
      "2008_000662\n",
      "2008_000666\n",
      "2008_000673\n",
      "2008_000700\n",
      "2008_000725\n",
      "2008_000731\n",
      "2008_000763\n",
      "2008_000765\n",
      "2008_000782\n",
      "2008_000795\n",
      "2008_000811\n",
      "2008_000848\n",
      "2008_000853\n",
      "2008_000863\n",
      "2008_000911\n",
      "2008_000919\n",
      "2008_000943\n",
      "2008_000992\n",
      "2008_001013\n",
      "2008_001028\n",
      "2008_001040\n",
      "2008_001070\n",
      "2008_001074\n",
      "2008_001076\n",
      "2008_001078\n",
      "2008_001135\n",
      "2008_001150\n",
      "2008_001170\n",
      "2008_001231\n",
      "2008_001249\n",
      "2008_001260\n",
      "2008_001283\n",
      "2008_001308\n",
      "2008_001379\n",
      "2008_001404\n",
      "2008_001433\n",
      "2008_001439\n",
      "2008_001478\n",
      "2008_001491\n",
      "2008_001504\n",
      "2008_001513\n",
      "2008_001514\n",
      "2008_001531\n",
      "2008_001546\n",
      "2008_001547\n",
      "2008_001580\n",
      "2008_001629\n",
      "2008_001640\n",
      "2008_001682\n",
      "2008_001688\n",
      "2008_001715\n",
      "2008_001821\n",
      "2008_001874\n",
      "2008_001885\n",
      "2008_001895\n",
      "2008_001966\n",
      "2008_001971\n",
      "2008_001992\n",
      "2008_002043\n",
      "2008_002152\n",
      "2008_002205\n",
      "2008_002212\n",
      "2008_002239\n",
      "2008_002240\n",
      "2008_002241\n",
      "2008_002269\n",
      "2008_002273\n",
      "2008_002358\n",
      "2008_002379\n",
      "2008_002383\n",
      "2008_002429\n",
      "2008_002464\n",
      "2008_002467\n",
      "2008_002492\n",
      "2008_002495\n",
      "2008_002504\n",
      "2008_002521\n",
      "2008_002536\n",
      "2008_002588\n",
      "2008_002623\n",
      "2008_002680\n",
      "2008_002681\n",
      "2008_002775\n",
      "2008_002778\n",
      "2008_002835\n",
      "2008_002859\n",
      "2008_002864\n",
      "2008_002900\n",
      "2008_002904\n",
      "2008_002929\n",
      "2008_002936\n",
      "2008_002942\n",
      "2008_002958\n",
      "2008_003003\n",
      "2008_003026\n",
      "2008_003034\n",
      "2008_003076\n",
      "2008_003105\n",
      "2008_003108\n",
      "2008_003110\n",
      "2008_003135\n",
      "2008_003141\n",
      "2008_003155\n",
      "2008_003210\n",
      "2008_003238\n",
      "2008_003270\n",
      "2008_003330\n",
      "2008_003333\n",
      "2008_003369\n",
      "2008_003379\n",
      "2008_003451\n",
      "2008_003461\n",
      "2008_003477\n",
      "2008_003492\n",
      "2008_003499\n",
      "2008_003511\n",
      "2008_003546\n",
      "2008_003576\n",
      "2008_003577\n",
      "2008_003676\n",
      "2008_003709\n",
      "2008_003733\n",
      "2008_003777\n",
      "2008_003782\n",
      "2008_003821\n",
      "2008_003846\n",
      "2008_003856\n",
      "2008_003858\n",
      "2008_003874\n",
      "2008_003876\n",
      "2008_003885\n",
      "2008_003886\n",
      "2008_003926\n",
      "2008_003976\n",
      "2008_004069\n",
      "2008_004101\n",
      "2008_004140\n",
      "2008_004172\n",
      "2008_004175\n",
      "2008_004212\n",
      "2008_004279\n",
      "2008_004339\n",
      "2008_004345\n",
      "2008_004363\n"
     ]
    }
   ],
   "source": [
    "with open('/home/guo/deeplab_v2/pascal-context/list/val_500_want.txt','r') as fa:\n",
    "    with open('/home/guo/deeplab_v2/pascal-context/list/val_500_touch_1.txt','r') as fb:\n",
    "        with open('/home/guo/deeplab_v2/pascal-context/list/val_500_self_1.txt','w') as fc:\n",
    "            for afile in fa:\n",
    "                jpg_name=afile[:afile.find('.png')]\n",
    "                \n",
    "                print jpg_name\n",
    "                fc.write(jpg_name+\" \")\n",
    "                fc.write(fb.readline())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 将某些文件更改其名字为对应同行的文件名"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2007_000033_blob_0.mat\n",
      "2009_004368_blob_0.mat\n",
      "2007_000042_blob_0.mat\n",
      "2010_002638_blob_0.mat\n",
      "2007_000061_blob_0.mat\n",
      "2009_001542_blob_0.mat\n",
      "2007_000123_blob_0.mat\n",
      "2009_002419_blob_0.mat\n",
      "2007_000129_blob_0.mat\n",
      "2010_003534_blob_0.mat\n",
      "2007_000175_blob_0.mat\n",
      "2008_002811_blob_0.mat\n",
      "2007_000187_blob_0.mat\n",
      "2010_000495_blob_0.mat\n",
      "2007_000323_blob_0.mat\n",
      "2010_002499_blob_0.mat\n",
      "2007_000332_blob_0.mat\n",
      "2009_000453_blob_0.mat\n",
      "2007_000346_blob_0.mat\n",
      "2008_007189_blob_0.mat\n",
      "2007_000452_blob_0.mat\n",
      "2008_000233_blob_0.mat\n",
      "2007_000464_blob_0.mat\n",
      "2010_005238_blob_0.mat\n",
      "2007_000491_blob_0.mat\n",
      "2008_006462_blob_0.mat\n",
      "2007_000529_blob_0.mat\n",
      "2010_004143_blob_0.mat\n",
      "2007_000559_blob_0.mat\n",
      "2009_000136_blob_0.mat\n",
      "2007_000572_blob_0.mat\n",
      "2009_003822_blob_0.mat\n",
      "2007_000629_blob_0.mat\n",
      "2009_003666_blob_0.mat\n",
      "2007_000636_blob_0.mat\n",
      "2010_002794_blob_0.mat\n",
      "2007_000661_blob_0.mat\n",
      "2010_003931_blob_0.mat\n",
      "2007_000663_blob_0.mat\n",
      "2009_002833_blob_0.mat\n",
      "2007_000676_blob_0.mat\n",
      "2008_005433_blob_0.mat\n",
      "2007_000727_blob_0.mat\n",
      "2010_004691_blob_0.mat\n",
      "2007_000762_blob_0.mat\n",
      "2010_000647_blob_0.mat\n",
      "2007_000783_blob_0.mat\n",
      "2010_002337_blob_0.mat\n",
      "2007_000799_blob_0.mat\n",
      "2008_001523_blob_0.mat\n",
      "2007_000804_blob_0.mat\n",
      "2010_001204_blob_0.mat\n",
      "2007_000830_blob_0.mat\n",
      "2008_008095_blob_0.mat\n",
      "2007_000837_blob_0.mat\n",
      "2010_001669_blob_0.mat\n",
      "2007_000847_blob_0.mat\n",
      "2008_002873_blob_0.mat\n",
      "2007_000862_blob_0.mat\n",
      "2008_002145_blob_0.mat\n",
      "2007_000925_blob_0.mat\n",
      "2008_004457_blob_0.mat\n",
      "2007_000999_blob_0.mat\n",
      "2008_003547_blob_0.mat\n",
      "2007_001154_blob_0.mat\n",
      "2010_003092_blob_0.mat\n",
      "2007_001175_blob_0.mat\n",
      "2008_007692_blob_0.mat\n",
      "2007_001239_blob_0.mat\n",
      "2008_001741_blob_0.mat\n",
      "2007_001284_blob_0.mat\n",
      "2008_004583_blob_0.mat\n",
      "2007_001288_blob_0.mat\n",
      "2009_001783_blob_0.mat\n",
      "2007_001289_blob_0.mat\n",
      "2009_003816_blob_0.mat\n",
      "2007_001299_blob_0.mat\n",
      "2008_003624_blob_0.mat\n",
      "2007_001311_blob_0.mat\n",
      "2010_002692_blob_0.mat\n",
      "2007_001321_blob_0.mat\n",
      "2008_008666_blob_0.mat\n",
      "2007_001377_blob_0.mat\n",
      "2009_000628_blob_0.mat\n",
      "2007_001408_blob_0.mat\n",
      "2009_003950_blob_0.mat\n",
      "2007_001423_blob_0.mat\n",
      "2008_006369_blob_0.mat\n",
      "2007_001430_blob_0.mat\n",
      "2008_000174_blob_0.mat\n",
      "2007_001457_blob_0.mat\n",
      "2010_002614_blob_0.mat\n",
      "2007_001458_blob_0.mat\n",
      "2008_005245_blob_0.mat\n",
      "2007_001526_blob_0.mat\n",
      "2008_007579_blob_0.mat\n",
      "2007_001568_blob_0.mat\n",
      "2008_000908_blob_0.mat\n",
      "2007_001585_blob_0.mat\n",
      "2010_005640_blob_0.mat\n",
      "2007_001586_blob_0.mat\n",
      "2010_001710_blob_0.mat\n",
      "2007_001587_blob_0.mat\n",
      "2008_000195_blob_0.mat\n",
      "2007_001594_blob_0.mat\n",
      "2010_005805_blob_0.mat\n",
      "2007_001630_blob_0.mat\n",
      "2009_005149_blob_0.mat\n",
      "2007_001677_blob_0.mat\n",
      "2008_000806_blob_0.mat\n",
      "2007_001678_blob_0.mat\n",
      "2010_004306_blob_0.mat\n",
      "2007_001717_blob_0.mat\n",
      "2009_003753_blob_0.mat\n",
      "2007_001733_blob_0.mat\n",
      "2008_000471_blob_0.mat\n",
      "2007_001761_blob_0.mat\n",
      "2008_004621_blob_0.mat\n",
      "2007_001763_blob_0.mat\n",
      "2009_003863_blob_0.mat\n",
      "2007_001774_blob_0.mat\n",
      "2010_005152_blob_0.mat\n",
      "2007_001884_blob_0.mat\n",
      "2008_004452_blob_0.mat\n",
      "2007_001955_blob_0.mat\n",
      "2008_005874_blob_0.mat\n",
      "2007_002046_blob_0.mat\n",
      "2009_004093_blob_0.mat\n",
      "2007_002094_blob_0.mat\n",
      "2010_005543_blob_0.mat\n",
      "2007_002119_blob_0.mat\n",
      "2010_004857_blob_0.mat\n",
      "2007_002132_blob_0.mat\n",
      "2009_000377_blob_0.mat\n",
      "2007_002260_blob_0.mat\n",
      "2010_004959_blob_0.mat\n",
      "2007_002266_blob_0.mat\n",
      "2008_005101_blob_0.mat\n",
      "2007_002268_blob_0.mat\n",
      "2009_004601_blob_0.mat\n",
      "2007_002284_blob_0.mat\n",
      "2009_002960_blob_0.mat\n",
      "2007_002376_blob_0.mat\n",
      "2010_001333_blob_0.mat\n",
      "2007_002378_blob_0.mat\n",
      "2008_004754_blob_0.mat\n",
      "2007_002387_blob_0.mat\n",
      "2009_004193_blob_0.mat\n",
      "2007_002400_blob_0.mat\n",
      "2008_000700_blob_0.mat\n",
      "2007_002412_blob_0.mat\n",
      "2009_001910_blob_0.mat\n",
      "2007_002426_blob_0.mat\n",
      "2009_000931_blob_0.mat\n",
      "2007_002427_blob_0.mat\n",
      "2008_008676_blob_0.mat\n",
      "2007_002445_blob_0.mat\n",
      "2008_005065_blob_0.mat\n",
      "2007_002470_blob_0.mat\n",
      "2008_008668_blob_0.mat\n",
      "2007_002539_blob_0.mat\n",
      "2008_005764_blob_0.mat\n",
      "2007_002565_blob_0.mat\n",
      "2009_005036_blob_0.mat\n",
      "2007_002597_blob_0.mat\n",
      "2008_005574_blob_0.mat\n",
      "2007_002618_blob_0.mat\n",
      "2009_003222_blob_0.mat\n",
      "2007_002619_blob_0.mat\n",
      "2008_000711_blob_0.mat\n",
      "2007_002624_blob_0.mat\n",
      "2010_003828_blob_0.mat\n",
      "2007_002643_blob_0.mat\n",
      "2010_005386_blob_0.mat\n",
      "2007_002648_blob_0.mat\n",
      "2010_001448_blob_0.mat\n",
      "2007_002719_blob_0.mat\n",
      "2008_001395_blob_0.mat\n",
      "2007_002728_blob_0.mat\n",
      "2009_004417_blob_0.mat\n",
      "2007_002823_blob_0.mat\n",
      "2010_004105_blob_0.mat\n",
      "2007_002824_blob_0.mat\n",
      "2008_004410_blob_0.mat\n",
      "2007_002852_blob_0.mat\n",
      "2009_001980_blob_0.mat\n",
      "2007_002903_blob_0.mat\n",
      "2009_001623_blob_0.mat\n",
      "2007_003011_blob_0.mat\n",
      "2010_005432_blob_0.mat\n",
      "2007_003020_blob_0.mat\n",
      "2009_005294_blob_0.mat\n",
      "2007_003022_blob_0.mat\n",
      "2010_002333_blob_0.mat\n",
      "2007_003051_blob_0.mat\n",
      "2009_003265_blob_0.mat\n",
      "2007_003088_blob_0.mat\n",
      "2008_006793_blob_0.mat\n",
      "2007_003101_blob_0.mat\n",
      "2009_003455_blob_0.mat\n",
      "2007_003106_blob_0.mat\n",
      "2008_006746_blob_0.mat\n",
      "2007_003110_blob_0.mat\n",
      "2008_006438_blob_0.mat\n",
      "2007_003131_blob_0.mat\n",
      "2008_004138_blob_0.mat\n",
      "2007_003134_blob_0.mat\n",
      "2008_001278_blob_0.mat\n",
      "2007_003137_blob_0.mat\n",
      "2009_004016_blob_0.mat\n",
      "2007_003143_blob_0.mat\n",
      "2010_003078_blob_0.mat\n",
      "2007_003169_blob_0.mat\n",
      "2009_001740_blob_0.mat\n",
      "2007_003188_blob_0.mat\n",
      "2009_004836_blob_0.mat\n",
      "2007_003194_blob_0.mat\n",
      "2008_002590_blob_0.mat\n",
      "2007_003195_blob_0.mat\n",
      "2009_000471_blob_0.mat\n",
      "2007_003201_blob_0.mat\n",
      "2009_000562_blob_0.mat\n",
      "2007_003349_blob_0.mat\n",
      "2008_002329_blob_0.mat\n",
      "2007_003367_blob_0.mat\n",
      "2008_007635_blob_0.mat\n",
      "2007_003373_blob_0.mat\n",
      "2008_001235_blob_0.mat\n",
      "2007_003499_blob_0.mat\n",
      "2010_001893_blob_0.mat\n",
      "2007_003503_blob_0.mat\n",
      "2008_000026_blob_0.mat\n",
      "2007_003506_blob_0.mat\n",
      "2008_002804_blob_0.mat\n",
      "2007_003530_blob_0.mat\n",
      "2008_007197_blob_0.mat\n",
      "2007_003571_blob_0.mat\n",
      "2010_003800_blob_0.mat\n",
      "2007_003587_blob_0.mat\n",
      "2010_005457_blob_0.mat\n",
      "2007_003611_blob_0.mat\n",
      "2009_001268_blob_0.mat\n",
      "2007_003621_blob_0.mat\n",
      "2010_004141_blob_0.mat\n",
      "2007_003682_blob_0.mat\n",
      "2010_005332_blob_0.mat\n",
      "2007_003711_blob_0.mat\n",
      "2009_000192_blob_0.mat\n",
      "2007_003714_blob_0.mat\n",
      "2010_001399_blob_0.mat\n",
      "2007_003742_blob_0.mat\n",
      "2010_003609_blob_0.mat\n",
      "2007_003786_blob_0.mat\n",
      "2010_002526_blob_0.mat\n",
      "2007_003841_blob_0.mat\n",
      "2010_000033_blob_0.mat\n",
      "2007_003848_blob_0.mat\n",
      "2010_004656_blob_0.mat\n",
      "2007_003861_blob_0.mat\n",
      "2008_002725_blob_0.mat\n",
      "2007_003872_blob_0.mat\n",
      "2008_003814_blob_0.mat\n",
      "2007_003917_blob_0.mat\n",
      "2008_005603_blob_0.mat\n",
      "2007_003957_blob_0.mat\n",
      "2008_002985_blob_0.mat\n",
      "2007_003991_blob_0.mat\n",
      "2008_005109_blob_0.mat\n",
      "2007_004033_blob_0.mat\n",
      "2010_001253_blob_0.mat\n",
      "2007_004052_blob_0.mat\n",
      "2009_001593_blob_0.mat\n",
      "2007_004112_blob_0.mat\n",
      "2008_004006_blob_0.mat\n",
      "2007_004121_blob_0.mat\n",
      "2008_001704_blob_0.mat\n",
      "2007_004143_blob_0.mat\n",
      "2008_004243_blob_0.mat\n",
      "2007_004189_blob_0.mat\n",
      "2008_006920_blob_0.mat\n",
      "2007_004190_blob_0.mat\n",
      "2010_005346_blob_0.mat\n",
      "2007_004193_blob_0.mat\n",
      "2009_005128_blob_0.mat\n",
      "2007_004241_blob_0.mat\n",
      "2009_000216_blob_0.mat\n",
      "2007_004275_blob_0.mat\n",
      "2008_007291_blob_0.mat\n",
      "2007_004281_blob_0.mat\n",
      "2008_005699_blob_0.mat\n",
      "2007_004380_blob_0.mat\n",
      "2010_000743_blob_0.mat\n",
      "2007_004392_blob_0.mat\n",
      "2010_000139_blob_0.mat\n",
      "2007_004405_blob_0.mat\n",
      "2008_008746_blob_0.mat\n",
      "2007_004468_blob_0.mat\n",
      "2008_003041_blob_0.mat\n",
      "2007_004483_blob_0.mat\n",
      "2010_003987_blob_0.mat\n",
      "2007_004510_blob_0.mat\n",
      "2008_005679_blob_0.mat\n",
      "2007_004538_blob_0.mat\n",
      "2009_000723_blob_0.mat\n",
      "2007_004558_blob_0.mat\n",
      "2008_004427_blob_0.mat\n",
      "2007_004644_blob_0.mat\n",
      "2010_001715_blob_0.mat\n",
      "2007_004649_blob_0.mat\n",
      "2008_000373_blob_0.mat\n",
      "2007_004712_blob_0.mat\n",
      "2009_002837_blob_0.mat\n",
      "2007_004722_blob_0.mat\n",
      "2008_004110_blob_0.mat\n",
      "2007_004856_blob_0.mat\n",
      "2010_005429_blob_0.mat\n",
      "2007_004866_blob_0.mat\n",
      "2009_000759_blob_0.mat\n",
      "2007_004902_blob_0.mat\n",
      "2009_002632_blob_0.mat\n",
      "2007_004969_blob_0.mat\n",
      "2010_005676_blob_0.mat\n",
      "2007_005058_blob_0.mat\n",
      "2008_005748_blob_0.mat\n",
      "2007_005074_blob_0.mat\n",
      "2008_006631_blob_0.mat\n",
      "2007_005107_blob_0.mat\n",
      "2010_004219_blob_0.mat\n",
      "2007_005114_blob_0.mat\n",
      "2009_003537_blob_0.mat\n",
      "2007_005149_blob_0.mat\n",
      "2010_005606_blob_0.mat\n",
      "2007_005173_blob_0.mat\n",
      "2010_002392_blob_0.mat\n",
      "2007_005281_blob_0.mat\n",
      "2008_003521_blob_0.mat\n",
      "2007_005294_blob_0.mat\n",
      "2008_004071_blob_0.mat\n",
      "2007_005296_blob_0.mat\n",
      "2008_004406_blob_0.mat\n",
      "2007_005304_blob_0.mat\n",
      "2009_004202_blob_0.mat\n",
      "2007_005331_blob_0.mat\n",
      "2009_001747_blob_0.mat\n",
      "2007_005354_blob_0.mat\n",
      "2008_006708_blob_0.mat\n",
      "2007_005358_blob_0.mat\n",
      "2008_008012_blob_0.mat\n",
      "2007_005428_blob_0.mat\n",
      "2008_006064_blob_0.mat\n",
      "2007_005460_blob_0.mat\n",
      "2008_004766_blob_0.mat\n",
      "2007_005469_blob_0.mat\n",
      "2010_004558_blob_0.mat\n",
      "2007_005509_blob_0.mat\n",
      "2010_002085_blob_0.mat\n",
      "2007_005547_blob_0.mat\n",
      "2009_004556_blob_0.mat\n",
      "2007_005600_blob_0.mat\n",
      "2009_000293_blob_0.mat\n",
      "2007_005608_blob_0.mat\n",
      "2009_003071_blob_0.mat\n",
      "2007_005626_blob_0.mat\n",
      "2009_004631_blob_0.mat\n",
      "2007_005689_blob_0.mat\n",
      "2008_004258_blob_0.mat\n",
      "2007_005696_blob_0.mat\n",
      "2008_008070_blob_0.mat\n",
      "2007_005705_blob_0.mat\n",
      "2008_002467_blob_0.mat\n",
      "2007_005759_blob_0.mat\n",
      "2009_000815_blob_0.mat\n",
      "2007_005803_blob_0.mat\n",
      "2009_004148_blob_0.mat\n",
      "2007_005813_blob_0.mat\n",
      "2010_004204_blob_0.mat\n",
      "2007_005828_blob_0.mat\n",
      "2008_007286_blob_0.mat\n",
      "2007_005844_blob_0.mat\n",
      "2009_002372_blob_0.mat\n",
      "2007_005845_blob_0.mat\n",
      "2009_002192_blob_0.mat\n",
      "2007_005857_blob_0.mat\n",
      "2010_001002_blob_0.mat\n",
      "2007_005911_blob_0.mat\n",
      "2008_008080_blob_0.mat\n",
      "2007_005915_blob_0.mat\n",
      "2010_002369_blob_0.mat\n",
      "2007_005978_blob_0.mat\n",
      "2008_004416_blob_0.mat\n",
      "2007_006028_blob_0.mat\n",
      "2009_004468_blob_0.mat\n",
      "2007_006035_blob_0.mat\n",
      "2008_005361_blob_0.mat\n",
      "2007_006046_blob_0.mat\n",
      "2008_006052_blob_0.mat\n",
      "2007_006076_blob_0.mat\n",
      "2010_005071_blob_0.mat\n",
      "2007_006086_blob_0.mat\n",
      "2008_002672_blob_0.mat\n",
      "2007_006117_blob_0.mat\n",
      "2008_008393_blob_0.mat\n",
      "2007_006171_blob_0.mat\n",
      "2008_004518_blob_0.mat\n",
      "2007_006241_blob_0.mat\n",
      "2008_007739_blob_0.mat\n",
      "2007_006260_blob_0.mat\n",
      "2009_003827_blob_0.mat\n",
      "2007_006277_blob_0.mat\n",
      "2008_007640_blob_0.mat\n",
      "2007_006348_blob_0.mat\n",
      "2008_002428_blob_0.mat\n",
      "2007_006364_blob_0.mat\n",
      "2008_006912_blob_0.mat\n",
      "2007_006373_blob_0.mat\n",
      "2008_004015_blob_0.mat\n",
      "2007_006444_blob_0.mat\n",
      "2009_002242_blob_0.mat\n",
      "2007_006449_blob_0.mat\n",
      "2010_004506_blob_0.mat\n",
      "2007_006549_blob_0.mat\n",
      "2009_005025_blob_0.mat\n",
      "2007_006553_blob_0.mat\n",
      "2009_000708_blob_0.mat\n",
      "2007_006560_blob_0.mat\n",
      "2008_008021_blob_0.mat\n",
      "2007_006647_blob_0.mat\n",
      "2009_002681_blob_0.mat\n",
      "2007_006678_blob_0.mat\n",
      "2008_008423_blob_0.mat\n",
      "2007_006680_blob_0.mat\n",
      "2010_002954_blob_0.mat\n",
      "2007_006698_blob_0.mat\n",
      "2010_003197_blob_0.mat\n",
      "2007_006761_blob_0.mat\n",
      "2008_002801_blob_0.mat\n",
      "2007_006802_blob_0.mat\n",
      "2009_003199_blob_0.mat\n",
      "2007_006837_blob_0.mat\n",
      "2008_006949_blob_0.mat\n",
      "2007_006841_blob_0.mat\n",
      "2008_003323_blob_0.mat\n",
      "2007_006864_blob_0.mat\n",
      "2010_005406_blob_0.mat\n",
      "2007_006866_blob_0.mat\n",
      "2009_001884_blob_0.mat\n",
      "2007_006946_blob_0.mat\n",
      "2010_000234_blob_0.mat\n",
      "2007_007007_blob_0.mat\n",
      "2008_000981_blob_0.mat\n",
      "2007_007084_blob_0.mat\n",
      "2008_004984_blob_0.mat\n",
      "2007_007109_blob_0.mat\n",
      "2010_003547_blob_0.mat\n",
      "2007_007130_blob_0.mat\n",
      "2008_003763_blob_0.mat\n",
      "2007_007165_blob_0.mat\n",
      "2008_006424_blob_0.mat\n",
      "2007_007168_blob_0.mat\n",
      "2008_005758_blob_0.mat\n",
      "2007_007195_blob_0.mat\n",
      "2009_002629_blob_0.mat\n",
      "2007_007196_blob_0.mat\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2008_001825_blob_0.mat\n",
      "2007_007203_blob_0.mat\n",
      "2009_002648_blob_0.mat\n",
      "2007_007211_blob_0.mat\n",
      "2010_001687_blob_0.mat\n",
      "2007_007235_blob_0.mat\n",
      "2009_000419_blob_0.mat\n",
      "2007_007341_blob_0.mat\n",
      "2010_003725_blob_0.mat\n",
      "2007_007414_blob_0.mat\n",
      "2008_000251_blob_0.mat\n",
      "2007_007417_blob_0.mat\n",
      "2010_005877_blob_0.mat\n",
      "2007_007470_blob_0.mat\n",
      "2010_001808_blob_0.mat\n",
      "2007_007477_blob_0.mat\n",
      "2008_006509_blob_0.mat\n",
      "2007_007493_blob_0.mat\n",
      "2008_005257_blob_0.mat\n",
      "2007_007498_blob_0.mat\n",
      "2009_003793_blob_0.mat\n",
      "2007_007524_blob_0.mat\n",
      "2010_002113_blob_0.mat\n",
      "2007_007534_blob_0.mat\n",
      "2008_000982_blob_0.mat\n",
      "2007_007624_blob_0.mat\n",
      "2010_004179_blob_0.mat\n",
      "2007_007651_blob_0.mat\n",
      "2008_006953_blob_0.mat\n",
      "2007_007688_blob_0.mat\n",
      "2008_007864_blob_0.mat\n",
      "2007_007748_blob_0.mat\n",
      "2008_002972_blob_0.mat\n",
      "2007_007795_blob_0.mat\n",
      "2008_001160_blob_0.mat\n",
      "2007_007810_blob_0.mat\n",
      "2009_001570_blob_0.mat\n",
      "2007_007815_blob_0.mat\n",
      "2008_007610_blob_0.mat\n",
      "2007_007818_blob_0.mat\n",
      "2008_001142_blob_0.mat\n",
      "2007_007836_blob_0.mat\n",
      "2010_003854_blob_0.mat\n",
      "2007_007849_blob_0.mat\n",
      "2008_006441_blob_0.mat\n",
      "2007_007881_blob_0.mat\n",
      "2009_000171_blob_0.mat\n",
      "2007_007996_blob_0.mat\n",
      "2008_004378_blob_0.mat\n",
      "2007_008051_blob_0.mat\n",
      "2009_005152_blob_0.mat\n",
      "2007_008084_blob_0.mat\n",
      "2010_002274_blob_0.mat\n",
      "2007_008106_blob_0.mat\n",
      "2008_006700_blob_0.mat\n",
      "2007_008110_blob_0.mat\n",
      "2010_002830_blob_0.mat\n",
      "2007_008204_blob_0.mat\n",
      "2008_001666_blob_0.mat\n",
      "2007_008222_blob_0.mat\n",
      "2008_005979_blob_0.mat\n",
      "2007_008256_blob_0.mat\n",
      "2010_006023_blob_0.mat\n",
      "2007_008260_blob_0.mat\n",
      "2008_003067_blob_0.mat\n",
      "2007_008339_blob_0.mat\n",
      "2010_000590_blob_0.mat\n",
      "2007_008374_blob_0.mat\n",
      "2009_000500_blob_0.mat\n",
      "2007_008415_blob_0.mat\n",
      "2009_003961_blob_0.mat\n",
      "2007_008430_blob_0.mat\n",
      "2010_000401_blob_0.mat\n",
      "2007_008543_blob_0.mat\n",
      "2010_000711_blob_0.mat\n",
      "2007_008547_blob_0.mat\n",
      "2008_002280_blob_0.mat\n",
      "2007_008596_blob_0.mat\n",
      "2010_001868_blob_0.mat\n",
      "2007_008645_blob_0.mat\n",
      "2008_005035_blob_0.mat\n",
      "2007_008670_blob_0.mat\n",
      "2009_000742_blob_0.mat\n",
      "2007_008708_blob_0.mat\n",
      "2008_005431_blob_0.mat\n",
      "2007_008722_blob_0.mat\n",
      "2010_001732_blob_0.mat\n",
      "2007_008747_blob_0.mat\n",
      "2009_002695_blob_0.mat\n",
      "2007_008802_blob_0.mat\n",
      "2010_004878_blob_0.mat\n",
      "2007_008815_blob_0.mat\n",
      "2009_002221_blob_0.mat\n",
      "2007_008897_blob_0.mat\n",
      "2008_008382_blob_0.mat\n",
      "2007_008944_blob_0.mat\n",
      "2008_006285_blob_0.mat\n",
      "2007_008964_blob_0.mat\n",
      "2009_001133_blob_0.mat\n",
      "2007_008973_blob_0.mat\n",
      "2010_005906_blob_0.mat\n",
      "2007_008980_blob_0.mat\n",
      "2010_003252_blob_0.mat\n",
      "2007_009015_blob_0.mat\n",
      "2010_002497_blob_0.mat\n",
      "2007_009068_blob_0.mat\n",
      "2009_001509_blob_0.mat\n",
      "2007_009084_blob_0.mat\n",
      "2008_003107_blob_0.mat\n",
      "2007_009088_blob_0.mat\n",
      "2008_003753_blob_0.mat\n",
      "2007_009096_blob_0.mat\n",
      "2008_003589_blob_0.mat\n",
      "2007_009221_blob_0.mat\n",
      "2008_005566_blob_0.mat\n",
      "2007_009245_blob_0.mat\n",
      "2008_005451_blob_0.mat\n",
      "2007_009251_blob_0.mat\n",
      "2008_002852_blob_0.mat\n",
      "2007_009252_blob_0.mat\n",
      "2009_001780_blob_0.mat\n",
      "2007_009258_blob_0.mat\n",
      "2010_000578_blob_0.mat\n",
      "2007_009320_blob_0.mat\n",
      "2008_008600_blob_0.mat\n",
      "2007_009323_blob_0.mat\n",
      "2009_004133_blob_0.mat\n",
      "2007_009331_blob_0.mat\n",
      "2008_004907_blob_0.mat\n",
      "2007_009346_blob_0.mat\n",
      "2008_000910_blob_0.mat\n",
      "2007_009392_blob_0.mat\n",
      "2008_007690_blob_0.mat\n",
      "2007_009413_blob_0.mat\n",
      "2010_004149_blob_0.mat\n",
      "2007_009419_blob_0.mat\n",
      "2008_000123_blob_0.mat\n",
      "2007_009446_blob_0.mat\n",
      "2009_000385_blob_0.mat\n",
      "2007_009458_blob_0.mat\n",
      "2010_004198_blob_0.mat\n",
      "2007_009521_blob_0.mat\n",
      "2009_003259_blob_0.mat\n",
      "2007_009562_blob_0.mat\n",
      "2008_003579_blob_0.mat\n",
      "2007_009592_blob_0.mat\n",
      "2009_002348_blob_0.mat\n",
      "2007_009654_blob_0.mat\n",
      "2008_007239_blob_0.mat\n",
      "2007_009655_blob_0.mat\n",
      "2010_005026_blob_0.mat\n",
      "2007_009684_blob_0.mat\n",
      "2010_006057_blob_0.mat\n",
      "2007_009687_blob_0.mat\n",
      "2009_004440_blob_0.mat\n",
      "2007_009691_blob_0.mat\n",
      "2010_001739_blob_0.mat\n",
      "2007_009706_blob_0.mat\n",
      "2009_000145_blob_0.mat\n",
      "2007_009750_blob_0.mat\n",
      "2008_007750_blob_0.mat\n",
      "2007_009756_blob_0.mat\n",
      "2008_004665_blob_0.mat\n",
      "2007_009764_blob_0.mat\n",
      "2009_003490_blob_0.mat\n",
      "2007_009794_blob_0.mat\n",
      "2009_001369_blob_0.mat\n",
      "2007_009817_blob_0.mat\n",
      "2010_001189_blob_0.mat\n",
      "2007_009841_blob_0.mat\n",
      "2008_001781_blob_0.mat\n",
      "2007_009897_blob_0.mat\n",
      "2008_007293_blob_0.mat\n",
      "2007_009911_blob_0.mat\n",
      "2010_000498_blob_0.mat\n",
      "2007_009923_blob_0.mat\n",
      "2010_003728_blob_0.mat\n",
      "2007_009938_blob_0.mat\n",
      "2009_001758_blob_0.mat\n",
      "2008_000009_blob_0.mat\n",
      "2009_004361_blob_0.mat\n",
      "2008_000016_blob_0.mat\n",
      "2010_000110_blob_0.mat\n",
      "2008_000073_blob_0.mat\n",
      "2009_001249_blob_0.mat\n",
      "2008_000075_blob_0.mat\n",
      "2008_006968_blob_0.mat\n",
      "2008_000080_blob_0.mat\n",
      "2010_002684_blob_0.mat\n",
      "2008_000107_blob_0.mat\n",
      "2009_000629_blob_0.mat\n",
      "2008_000120_blob_0.mat\n",
      "2008_005376_blob_0.mat\n",
      "2008_000123_blob_0.mat\n",
      "2010_006062_blob_0.mat\n",
      "2008_000149_blob_0.mat\n",
      "2008_007515_blob_0.mat\n",
      "2008_000182_blob_0.mat\n",
      "2008_002856_blob_0.mat\n",
      "2008_000213_blob_0.mat\n",
      "2009_003656_blob_0.mat\n",
      "2008_000215_blob_0.mat\n",
      "2009_002445_blob_0.mat\n",
      "2008_000223_blob_0.mat\n",
      "2008_001866_blob_0.mat\n",
      "2008_000233_blob_0.mat\n",
      "2009_002749_blob_0.mat\n",
      "2008_000234_blob_0.mat\n",
      "2008_008319_blob_0.mat\n",
      "2008_000239_blob_0.mat\n",
      "2008_000187_blob_0.mat\n",
      "2008_000254_blob_0.mat\n",
      "2009_002145_blob_0.mat\n",
      "2008_000270_blob_0.mat\n",
      "2008_006797_blob_0.mat\n",
      "2008_000271_blob_0.mat\n",
      "2008_002052_blob_0.mat\n",
      "2008_000345_blob_0.mat\n",
      "2009_001810_blob_0.mat\n",
      "2008_000359_blob_0.mat\n",
      "2010_005596_blob_0.mat\n",
      "2008_000391_blob_0.mat\n",
      "2008_002495_blob_0.mat\n",
      "2008_000401_blob_0.mat\n",
      "2008_000376_blob_0.mat\n",
      "2008_000464_blob_0.mat\n",
      "2010_004451_blob_0.mat\n",
      "2008_000469_blob_0.mat\n",
      "2009_001006_blob_0.mat\n",
      "2008_000474_blob_0.mat\n",
      "2009_003271_blob_0.mat\n",
      "2008_000501_blob_0.mat\n",
      "2008_008342_blob_0.mat\n",
      "2008_000510_blob_0.mat\n",
      "2009_002570_blob_0.mat\n",
      "2008_000533_blob_0.mat\n",
      "2009_003316_blob_0.mat\n",
      "2008_000573_blob_0.mat\n",
      "2010_001850_blob_0.mat\n",
      "2008_000589_blob_0.mat\n",
      "2009_002524_blob_0.mat\n",
      "2008_000602_blob_0.mat\n",
      "2009_002097_blob_0.mat\n",
      "2008_000630_blob_0.mat\n",
      "2008_008296_blob_0.mat\n",
      "2008_000657_blob_0.mat\n",
      "2010_000133_blob_0.mat\n",
      "2008_000661_blob_0.mat\n",
      "2008_008122_blob_0.mat\n",
      "2008_000662_blob_0.mat\n",
      "2009_001374_blob_0.mat\n",
      "2008_000666_blob_0.mat\n",
      "2008_003076_blob_0.mat\n",
      "2008_000673_blob_0.mat\n",
      "2009_004784_blob_0.mat\n",
      "2008_000700_blob_0.mat\n",
      "2008_007163_blob_0.mat\n",
      "2008_000725_blob_0.mat\n",
      "2009_004518_blob_0.mat\n",
      "2008_000731_blob_0.mat\n",
      "2008_001586_blob_0.mat\n",
      "2008_000763_blob_0.mat\n",
      "2009_001937_blob_0.mat\n",
      "2008_000765_blob_0.mat\n",
      "2009_003052_blob_0.mat\n",
      "2008_000782_blob_0.mat\n",
      "2009_004031_blob_0.mat\n",
      "2008_000795_blob_0.mat\n",
      "2009_002912_blob_0.mat\n",
      "2008_000811_blob_0.mat\n",
      "2009_002558_blob_0.mat\n",
      "2008_000848_blob_0.mat\n",
      "2008_006705_blob_0.mat\n",
      "2008_000853_blob_0.mat\n",
      "2008_002954_blob_0.mat\n",
      "2008_000863_blob_0.mat\n",
      "2009_005056_blob_0.mat\n",
      "2008_000911_blob_0.mat\n",
      "2008_004462_blob_0.mat\n",
      "2008_000919_blob_0.mat\n",
      "2008_000723_blob_0.mat\n",
      "2008_000943_blob_0.mat\n",
      "2010_000524_blob_0.mat\n",
      "2008_000992_blob_0.mat\n",
      "2008_005247_blob_0.mat\n",
      "2008_001013_blob_0.mat\n",
      "2010_000942_blob_0.mat\n",
      "2008_001028_blob_0.mat\n",
      "2009_002698_blob_0.mat\n",
      "2008_001040_blob_0.mat\n",
      "2009_002299_blob_0.mat\n",
      "2008_001070_blob_0.mat\n",
      "2009_003269_blob_0.mat\n",
      "2008_001074_blob_0.mat\n",
      "2010_001425_blob_0.mat\n",
      "2008_001076_blob_0.mat\n",
      "2008_001481_blob_0.mat\n",
      "2008_001078_blob_0.mat\n",
      "2008_004656_blob_0.mat\n",
      "2008_001135_blob_0.mat\n",
      "2010_002742_blob_0.mat\n",
      "2008_001150_blob_0.mat\n",
      "2008_007788_blob_0.mat\n",
      "2008_001170_blob_0.mat\n",
      "2008_001007_blob_0.mat\n",
      "2008_001231_blob_0.mat\n",
      "2008_001205_blob_0.mat\n",
      "2008_001249_blob_0.mat\n",
      "2008_001021_blob_0.mat\n",
      "2008_001260_blob_0.mat\n",
      "2008_004422_blob_0.mat\n",
      "2008_001283_blob_0.mat\n",
      "2010_001012_blob_0.mat\n",
      "2008_001308_blob_0.mat\n",
      "2008_004768_blob_0.mat\n",
      "2008_001379_blob_0.mat\n",
      "2009_003732_blob_0.mat\n",
      "2008_001404_blob_0.mat\n",
      "2009_003181_blob_0.mat\n",
      "2008_001433_blob_0.mat\n",
      "2010_002995_blob_0.mat\n",
      "2008_001439_blob_0.mat\n",
      "2010_001310_blob_0.mat\n",
      "2008_001478_blob_0.mat\n",
      "2009_001329_blob_0.mat\n",
      "2008_001491_blob_0.mat\n",
      "2008_007998_blob_0.mat\n",
      "2008_001504_blob_0.mat\n",
      "2008_007134_blob_0.mat\n",
      "2008_001513_blob_0.mat\n",
      "2009_000793_blob_0.mat\n",
      "2008_001514_blob_0.mat\n",
      "2009_004169_blob_0.mat\n",
      "2008_001531_blob_0.mat\n",
      "2008_005283_blob_0.mat\n",
      "2008_001546_blob_0.mat\n",
      "2009_003598_blob_0.mat\n",
      "2008_001547_blob_0.mat\n",
      "2009_004942_blob_0.mat\n",
      "2008_001580_blob_0.mat\n",
      "2008_007410_blob_0.mat\n",
      "2008_001629_blob_0.mat\n",
      "2008_000021_blob_0.mat\n",
      "2008_001640_blob_0.mat\n",
      "2010_005820_blob_0.mat\n",
      "2008_001682_blob_0.mat\n",
      "2010_004415_blob_0.mat\n",
      "2008_001688_blob_0.mat\n",
      "2008_001838_blob_0.mat\n",
      "2008_001715_blob_0.mat\n",
      "2010_004951_blob_0.mat\n",
      "2008_001821_blob_0.mat\n",
      "2009_003801_blob_0.mat\n",
      "2008_001874_blob_0.mat\n",
      "2008_001551_blob_0.mat\n",
      "2008_001885_blob_0.mat\n",
      "2008_007947_blob_0.mat\n",
      "2008_001895_blob_0.mat\n",
      "2008_003676_blob_0.mat\n",
      "2008_001966_blob_0.mat\n",
      "2010_004624_blob_0.mat\n",
      "2008_001971_blob_0.mat\n",
      "2008_003776_blob_0.mat\n",
      "2008_001992_blob_0.mat\n",
      "2008_001290_blob_0.mat\n",
      "2008_002043_blob_0.mat\n",
      "2010_001292_blob_0.mat\n",
      "2008_002152_blob_0.mat\n",
      "2009_004921_blob_0.mat\n",
      "2008_002205_blob_0.mat\n",
      "2010_003520_blob_0.mat\n",
      "2008_002212_blob_0.mat\n",
      "2008_004318_blob_0.mat\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2008_002239_blob_0.mat\n",
      "2008_001661_blob_0.mat\n",
      "2008_002240_blob_0.mat\n",
      "2009_001806_blob_0.mat\n",
      "2008_002241_blob_0.mat\n",
      "2008_007435_blob_0.mat\n",
      "2008_002269_blob_0.mat\n",
      "2008_001190_blob_0.mat\n",
      "2008_002273_blob_0.mat\n",
      "2010_004466_blob_0.mat\n",
      "2008_002358_blob_0.mat\n",
      "2010_000655_blob_0.mat\n",
      "2008_002379_blob_0.mat\n",
      "2009_001990_blob_0.mat\n",
      "2008_002383_blob_0.mat\n",
      "2008_006872_blob_0.mat\n",
      "2008_002429_blob_0.mat\n",
      "2009_000641_blob_0.mat\n",
      "2008_002464_blob_0.mat\n",
      "2010_003910_blob_0.mat\n",
      "2008_002467_blob_0.mat\n",
      "2008_000828_blob_0.mat\n",
      "2008_002492_blob_0.mat\n",
      "2008_007084_blob_0.mat\n",
      "2008_002495_blob_0.mat\n",
      "2009_000928_blob_0.mat\n",
      "2008_002504_blob_0.mat\n",
      "2009_000283_blob_0.mat\n",
      "2008_002521_blob_0.mat\n",
      "2010_005974_blob_0.mat\n",
      "2008_002536_blob_0.mat\n",
      "2009_003806_blob_0.mat\n",
      "2008_002588_blob_0.mat\n",
      "2009_003350_blob_0.mat\n",
      "2008_002623_blob_0.mat\n",
      "2009_003799_blob_0.mat\n",
      "2008_002680_blob_0.mat\n",
      "2010_003539_blob_0.mat\n",
      "2008_002681_blob_0.mat\n",
      "2009_001964_blob_0.mat\n",
      "2008_002775_blob_0.mat\n",
      "2008_005072_blob_0.mat\n",
      "2008_002778_blob_0.mat\n",
      "2008_000348_blob_0.mat\n",
      "2008_002835_blob_0.mat\n",
      "2008_007476_blob_0.mat\n",
      "2008_002859_blob_0.mat\n",
      "2008_003101_blob_0.mat\n",
      "2008_002864_blob_0.mat\n",
      "2008_004513_blob_0.mat\n",
      "2008_002900_blob_0.mat\n",
      "2009_003415_blob_0.mat\n",
      "2008_002904_blob_0.mat\n",
      "2009_004934_blob_0.mat\n",
      "2008_002929_blob_0.mat\n",
      "2008_006489_blob_0.mat\n",
      "2008_002936_blob_0.mat\n",
      "2010_001550_blob_0.mat\n",
      "2008_002942_blob_0.mat\n",
      "2008_007611_blob_0.mat\n",
      "2008_002958_blob_0.mat\n",
      "2010_003762_blob_0.mat\n",
      "2008_003003_blob_0.mat\n",
      "2008_004469_blob_0.mat\n",
      "2008_003026_blob_0.mat\n",
      "2008_005641_blob_0.mat\n",
      "2008_003034_blob_0.mat\n",
      "2009_000011_blob_0.mat\n",
      "2008_003076_blob_0.mat\n",
      "2010_002979_blob_0.mat\n",
      "2008_003105_blob_0.mat\n",
      "2008_006188_blob_0.mat\n",
      "2008_003108_blob_0.mat\n",
      "2008_000837_blob_0.mat\n",
      "2008_003110_blob_0.mat\n",
      "2009_002388_blob_0.mat\n",
      "2008_003135_blob_0.mat\n",
      "2009_004857_blob_0.mat\n",
      "2008_003141_blob_0.mat\n",
      "2010_005275_blob_0.mat\n",
      "2008_003155_blob_0.mat\n",
      "2010_002537_blob_0.mat\n",
      "2008_003210_blob_0.mat\n",
      "2010_003062_blob_0.mat\n",
      "2008_003238_blob_0.mat\n",
      "2008_006207_blob_0.mat\n",
      "2008_003270_blob_0.mat\n",
      "2009_003156_blob_0.mat\n",
      "2008_003330_blob_0.mat\n",
      "2008_006067_blob_0.mat\n",
      "2008_003333_blob_0.mat\n",
      "2009_003416_blob_0.mat\n",
      "2008_003369_blob_0.mat\n",
      "2010_004104_blob_0.mat\n",
      "2008_003379_blob_0.mat\n",
      "2009_005005_blob_0.mat\n",
      "2008_003451_blob_0.mat\n",
      "2010_005957_blob_0.mat\n",
      "2008_003461_blob_0.mat\n",
      "2010_000076_blob_0.mat\n",
      "2008_003477_blob_0.mat\n",
      "2010_004523_blob_0.mat\n",
      "2008_003492_blob_0.mat\n",
      "2009_002077_blob_0.mat\n",
      "2008_003499_blob_0.mat\n",
      "2010_001364_blob_0.mat\n",
      "2008_003511_blob_0.mat\n",
      "2009_003944_blob_0.mat\n",
      "2008_003546_blob_0.mat\n",
      "2009_001074_blob_0.mat\n",
      "2008_003576_blob_0.mat\n",
      "2008_008476_blob_0.mat\n",
      "2008_003577_blob_0.mat\n",
      "2009_002216_blob_0.mat\n",
      "2008_003676_blob_0.mat\n",
      "2010_003415_blob_0.mat\n",
      "2008_003709_blob_0.mat\n",
      "2009_003142_blob_0.mat\n",
      "2008_003733_blob_0.mat\n",
      "2009_002127_blob_0.mat\n",
      "2008_003777_blob_0.mat\n",
      "2010_001572_blob_0.mat\n",
      "2008_003782_blob_0.mat\n",
      "2010_001814_blob_0.mat\n",
      "2008_003821_blob_0.mat\n",
      "2008_007514_blob_0.mat\n",
      "2008_003846_blob_0.mat\n",
      "2009_001100_blob_0.mat\n",
      "2008_003856_blob_0.mat\n",
      "2010_001569_blob_0.mat\n",
      "2008_003858_blob_0.mat\n",
      "2010_002431_blob_0.mat\n",
      "2008_003874_blob_0.mat\n",
      "2010_006015_blob_0.mat\n",
      "2008_003876_blob_0.mat\n",
      "2010_000797_blob_0.mat\n",
      "2008_003885_blob_0.mat\n",
      "2009_000820_blob_0.mat\n",
      "2008_003886_blob_0.mat\n",
      "2008_005976_blob_0.mat\n",
      "2008_003926_blob_0.mat\n",
      "2009_004174_blob_0.mat\n",
      "2008_003976_blob_0.mat\n",
      "2010_000782_blob_0.mat\n",
      "2008_004069_blob_0.mat\n",
      "2008_004232_blob_0.mat\n",
      "2008_004101_blob_0.mat\n",
      "2008_007221_blob_0.mat\n",
      "2008_004140_blob_0.mat\n",
      "2009_001308_blob_0.mat\n",
      "2008_004172_blob_0.mat\n",
      "2009_001184_blob_0.mat\n",
      "2008_004175_blob_0.mat\n",
      "2008_003288_blob_0.mat\n",
      "2008_004212_blob_0.mat\n",
      "2010_004777_blob_0.mat\n",
      "2008_004279_blob_0.mat\n",
      "2008_002558_blob_0.mat\n",
      "2008_004339_blob_0.mat\n",
      "2010_003950_blob_0.mat\n",
      "2008_004345_blob_0.mat\n",
      "2009_004052_blob_0.mat\n",
      "2008_004363_blob_0.mat\n",
      "2008_007949_blob_0.mat\n"
     ]
    },
    {
     "ename": "OSError",
     "evalue": "[Errno 2] No such file or directory",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m\u001b[0m",
      "\u001b[0;31mOSError\u001b[0mTraceback (most recent call last)",
      "\u001b[0;32m<ipython-input-14-104090ea7758>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      7\u001b[0m     \u001b[0;32mprint\u001b[0m \u001b[0mstopkey\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;34m\"_blob_0.mat\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      8\u001b[0m     \u001b[0;32mprint\u001b[0m \u001b[0mstopkey\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;34m\"_blob_0.mat\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 9\u001b[0;31m     \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrenames\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mstopkey\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;34m\"_blob_0.mat\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mstopkey\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;34m\"_blob_0.mat\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     10\u001b[0m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"finished!\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib/python2.7/os.pyc\u001b[0m in \u001b[0;36mrenames\u001b[0;34m(old, new)\u001b[0m\n\u001b[1;32m    197\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    198\u001b[0m         \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 199\u001b[0;31m     \u001b[0mrename\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mold\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnew\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    200\u001b[0m     \u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msplit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mold\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    201\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mOSError\u001b[0m: [Errno 2] No such file or directory"
     ]
    }
   ],
   "source": [
    "import os \n",
    "path='/home/guo/deeplab_v2/pascal-context/features/deeplab_largeFOV/val/fc8_500'\n",
    "f = open('/home/guo/deeplab_v2/pascal-context/list/val_500_self_1.txt','r') \n",
    "lines = f.readlines()\n",
    "for line in lines:\n",
    "    stopkey=line.split(' ',2)\n",
    "    print stopkey[0]+\"_blob_0.mat\"\n",
    "    print stopkey[1]+\"_blob_0.mat\"\n",
    "    os.renames(os.path.join(path,stopkey[0]+\"_blob_0.mat\"),os.path.join(path,stopkey[1]+\"_blob_0.mat\"))\n",
    "print \"finished!\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.将网上下载的colours复制到文件colours.txt，做split切分，存进save_colour.txt文件中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "RGB\r\n",
      "\n",
      "240,248,255\r\n",
      "\n",
      "250,235,215\r\n",
      "\n",
      "0,255,255\r\n",
      "\n",
      "127,255,212\r\n",
      "\n",
      "240,255,255\r\n",
      "\n",
      "245,245,220\r\n",
      "\n",
      "255,228,196\r\n",
      "\n",
      "0,0,0\r\n",
      "\n",
      "255,235,205\r\n",
      "\n",
      "0,0,255\r\n",
      "\n",
      "138,43,226\r\n",
      "\n",
      "165,42,42\r\n",
      "\n",
      "222,184,135\r\n",
      "\n",
      "95,158,160\r\n",
      "\n",
      "127,255,0\r\n",
      "\n",
      "210,105,30\r\n",
      "\n",
      "255,127,80\r\n",
      "\n",
      "100,149,237\r\n",
      "\n",
      "255,248,220\r\n",
      "\n",
      "220,20,60\r\n",
      "\n",
      "0,255,255\r\n",
      "\n",
      "0,0,139\r\n",
      "\n",
      "0,139,139\r\n",
      "\n",
      "184,134,11\r\n",
      "\n",
      "169,169,169\r\n",
      "\n",
      "169,169,169\r\n",
      "\n",
      "0,100,0\r\n",
      "\n",
      "189,183,107\r\n",
      "\n",
      "139,0,139\r\n",
      "\n",
      "85,107,47\r\n",
      "\n",
      "255,140,0\r\n",
      "\n",
      "153,50,204\r\n",
      "\n",
      "139,0,0\r\n",
      "\n",
      "233,150,122\r\n",
      "\n",
      "143,188,143\r\n",
      "\n",
      "72,61,139\r\n",
      "\n",
      "47,79,79\r\n",
      "\n",
      "47,79,79\r\n",
      "\n",
      "0,206,209\r\n",
      "\n",
      "148,0,211\r\n",
      "\n",
      "255,20,147\r\n",
      "\n",
      "0,191,255\r\n",
      "\n",
      "105,105,105\r\n",
      "\n",
      "105,105,105\r\n",
      "\n",
      "30,144,255\r\n",
      "\n",
      "178,34,34\r\n",
      "\n",
      "255,250,240\r\n",
      "\n",
      "34,139,34\r\n",
      "\n",
      "255,0,255\r\n",
      "\n",
      "220,220,220\r\n",
      "\n",
      "248,248,255\r\n",
      "\n",
      "255,215,0\r\n",
      "\n",
      "218,165,32\r\n",
      "\n",
      "128,128,128\r\n",
      "\n",
      "128,128,128\r\n",
      "\n",
      "0,128,0\r\n",
      "\n",
      "173,255,47\r\n",
      "\n",
      "240,255,240\r\n",
      "\n",
      "255,105,180\r\n",
      "\n",
      "205,92,92\r\n",
      "\n",
      "75,0,130\r\n",
      "\n",
      "255,255,240\r\n",
      "\n",
      "240,230,140\r\n",
      "\n",
      "230,230,250\r\n",
      "\n",
      "255,240,245\r\n",
      "\n",
      "124,252,0\r\n",
      "\n",
      "255,250,205\r\n",
      "\n",
      "173,216,230\r\n",
      "\n",
      "240,128,128\r\n",
      "\n",
      "224,255,255\r\n",
      "\n",
      "250,250,210\r\n",
      "\n",
      "211,211,211\r\n",
      "\n",
      "211,211,211\r\n",
      "\n",
      "144,238,144\r\n",
      "\n",
      "255,182,193\r\n",
      "\n",
      "255,160,122\r\n",
      "\n",
      "32,178,170\r\n",
      "\n",
      "135,206,250\r\n",
      "\n",
      "119,136,153\r\n",
      "\n",
      "119,136,153\r\n",
      "\n",
      "176,196,222\r\n",
      "\n",
      "255,255,224\r\n",
      "\n",
      "0,255,0\r\n",
      "\n",
      "50,205,50\r\n",
      "\n",
      "250,240,230\r\n",
      "\n",
      "255,0,255\r\n",
      "\n",
      "128,0,0\r\n",
      "\n",
      "102,205,170\r\n",
      "\n",
      "0,0,205\r\n",
      "\n",
      "186,85,211\r\n",
      "\n",
      "147,112,219\r\n",
      "\n",
      "60,179,113\r\n",
      "\n",
      "123,104,238\r\n",
      "\n",
      "0,250,154\r\n",
      "\n",
      "72,209,204\r\n",
      "\n",
      "199,21,133\r\n",
      "\n",
      "25,25,112\r\n",
      "\n",
      "245,255,250\r\n",
      "\n",
      "255,228,225\r\n",
      "\n",
      "255,228,181\r\n",
      "\n",
      "255,222,173\r\n",
      "\n",
      "0,0,128\r\n",
      "\n",
      "253,245,230\r\n",
      "\n",
      "128,128,0\r\n",
      "\n",
      "107,142,35\r\n",
      "\n",
      "255,165,0\r\n",
      "\n",
      "255,69,0\r\n",
      "\n",
      "218,112,214\r\n",
      "\n",
      "238,232,170\r\n",
      "\n",
      "152,251,152\r\n",
      "\n",
      "175,238,238\r\n",
      "\n",
      "219,112,147\r\n",
      "\n",
      "255,239,213\r\n",
      "\n",
      "255,218,185\r\n",
      "\n",
      "205,133,63\r\n",
      "\n",
      "255,192,203\r\n",
      "\n",
      "221,160,221\r\n",
      "\n",
      "176,224,230\r\n",
      "\n",
      "128,0,128\r\n",
      "\n",
      "102,51,153\r\n",
      "\n",
      "255,0,0\r\n",
      "\n",
      "188,143,143\r\n",
      "\n",
      "65,105,225\r\n",
      "\n",
      "139,69,19\r\n",
      "\n",
      "250,128,114\r\n",
      "\n",
      "244,164,96\r\n",
      "\n",
      "46,139,87\r\n",
      "\n",
      "255,245,238\r\n",
      "\n",
      "160,82,45\r\n",
      "\n",
      "192,192,192\r\n",
      "\n",
      "135,206,235\r\n",
      "\n",
      "106,90,205\r\n",
      "\n",
      "112,128,144\r\n",
      "\n",
      "112,128,144\r\n",
      "\n",
      "255,250,250\r\n",
      "\n",
      "0,255,127\r\n",
      "\n",
      "70,130,180\r\n",
      "\n",
      "210,180,140\r\n",
      "\n",
      "0,128,128\r\n",
      "\n",
      "216,191,216\r\n",
      "\n",
      "255,99,71\r\n",
      "\n",
      "64,224,208\r\n",
      "\n",
      "238,130,238\r\n",
      "\n",
      "245,222,179\r\n",
      "\n",
      "255,255,255\r\n",
      "\n",
      "245,245,245\r\n",
      "\n",
      "255,255,0\r\n",
      "\n",
      "154,205,50\n"
     ]
    }
   ],
   "source": [
    "f = open('colours.txt','r')   \n",
    "t=open('save_colour.txt','w')\n",
    "lines = f.readlines()\n",
    "\n",
    "for line in lines:\n",
    "    stopkey=line.split('\\t',2)\n",
    "    t.write(\"a\")\n",
    "    print stopkey[2]\n",
    "    #print '['+stopkey[0]+']'\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.从save_colour.txt读取数据，并保存成代码中可以用的格式"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[RGB],\n",
      "[240,248,255],\n",
      "[250,235,215],\n",
      "[0,255,255],\n",
      "[127,255,212],\n",
      "[240,255,255],\n",
      "[245,245,220],\n",
      "[255,228,196],\n",
      "[0,0,0],\n",
      "[255,235,205],\n",
      "[0,0,255],\n",
      "[138,43,226],\n",
      "[165,42,42],\n",
      "[222,184,135],\n",
      "[95,158,160],\n",
      "[127,255,0],\n",
      "[210,105,30],\n",
      "[255,127,80],\n",
      "[100,149,237],\n",
      "[255,248,220],\n",
      "[220,20,60],\n",
      "[0,255,255],\n",
      "[0,0,139],\n",
      "[0,139,139],\n",
      "[184,134,11],\n",
      "[169,169,169],\n",
      "[169,169,169],\n",
      "[0,100,0],\n",
      "[189,183,107],\n",
      "[139,0,139],\n",
      "[85,107,47],\n",
      "[255,140,0],\n",
      "[153,50,204],\n",
      "[139,0,0],\n",
      "[233,150,122],\n",
      "[143,188,143],\n",
      "[72,61,139],\n",
      "[47,79,79],\n",
      "[47,79,79],\n",
      "[0,206,209],\n",
      "[148,0,211],\n",
      "[255,20,147],\n",
      "[0,191,255],\n",
      "[105,105,105],\n",
      "[105,105,105],\n",
      "[30,144,255],\n",
      "[178,34,34],\n",
      "[255,250,240],\n",
      "[34,139,34],\n",
      "[255,0,255],\n",
      "[220,220,220],\n",
      "[248,248,255],\n",
      "[255,215,0],\n",
      "[218,165,32],\n",
      "[128,128,128],\n",
      "[128,128,128],\n",
      "[0,128,0],\n",
      "[173,255,47],\n",
      "[240,255,240],\n",
      "[255,105,180],\n",
      "[205,92,92],\n",
      "[75,0,130],\n",
      "[255,255,240],\n",
      "[240,230,140],\n",
      "[230,230,250],\n",
      "[255,240,245],\n",
      "[124,252,0],\n",
      "[255,250,205],\n",
      "[173,216,230],\n",
      "[240,128,128],\n",
      "[224,255,255],\n",
      "[250,250,210],\n",
      "[211,211,211],\n",
      "[211,211,211],\n",
      "[144,238,144],\n",
      "[255,182,193],\n",
      "[255,160,122],\n",
      "[32,178,170],\n",
      "[135,206,250],\n",
      "[119,136,153],\n",
      "[119,136,153],\n",
      "[176,196,222],\n",
      "[255,255,224],\n",
      "[0,255,0],\n",
      "[50,205,50],\n",
      "[250,240,230],\n",
      "[255,0,255],\n",
      "[128,0,0],\n",
      "[102,205,170],\n",
      "[0,0,205],\n",
      "[186,85,211],\n",
      "[147,112,219],\n",
      "[60,179,113],\n",
      "[123,104,238],\n",
      "[0,250,154],\n",
      "[72,209,204],\n",
      "[199,21,133],\n",
      "[25,25,112],\n",
      "[245,255,250],\n",
      "[255,228,225],\n",
      "[255,228,181],\n",
      "[255,222,173],\n",
      "[0,0,128],\n",
      "[253,245,230],\n",
      "[128,128,0],\n",
      "[107,142,35],\n",
      "[255,165,0],\n",
      "[255,69,0],\n",
      "[218,112,214],\n",
      "[238,232,170],\n",
      "[152,251,152],\n",
      "[175,238,238],\n",
      "[219,112,147],\n",
      "[255,239,213],\n",
      "[255,218,185],\n",
      "[205,133,63],\n",
      "[255,192,203],\n",
      "[221,160,221],\n",
      "[176,224,230],\n",
      "[128,0,128],\n",
      "[102,51,153],\n",
      "[255,0,0],\n",
      "[188,143,143],\n",
      "[65,105,225],\n",
      "[139,69,19],\n",
      "[250,128,114],\n",
      "[244,164,96],\n",
      "[46,139,87],\n",
      "[255,245,238],\n",
      "[160,82,45],\n",
      "[192,192,192],\n",
      "[135,206,235],\n",
      "[106,90,205],\n",
      "[112,128,144],\n",
      "[112,128,144],\n",
      "[255,250,250],\n",
      "[0,255,127],\n",
      "[70,130,180],\n",
      "[210,180,140],\n",
      "[0,128,128],\n",
      "[216,191,216],\n",
      "[255,99,71],\n",
      "[64,224,208],\n",
      "[238,130,238],\n",
      "[245,222,179],\n",
      "[255,255,255],\n",
      "[245,245,245],\n",
      "[255,255,0],\n",
      "[154,205,50],\n"
     ]
    }
   ],
   "source": [
    "f = open('save_colour.txt','r')   \n",
    "lines = f.readlines()\n",
    "for line in lines:\n",
    "    stopkey=line.split('\\r',1)\n",
    "    #t.write(\"a\")\n",
    "    print \"[\"+stopkey[0]+\"],\"\n",
    "    #print '['+stopkey[0]+']'\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
